diff options
author | raf <none@none> | 2008-06-06 14:02:15 -0700 |
---|---|---|
committer | raf <none@none> | 2008-06-06 14:02:15 -0700 |
commit | 7257d1b4d25bfac0c802847390e98a464fd787ac (patch) | |
tree | c73fc17df920bc2ca9438c25fea3529890296afd | |
parent | 455903679f53d12d92035adc60bc7c3d95e6b6a2 (diff) | |
download | illumos-gate-7257d1b4d25bfac0c802847390e98a464fd787ac.tar.gz |
PSARC 2008/309 expunge synonyms.h
6700179 expunge synonyms.h
--HG--
rename : usr/src/cmd/sgs/libelf/common/syn.h => deleted_files/usr/src/cmd/sgs/libelf/common/syn.h
rename : usr/src/cmd/sgs/librtld/common/lintsup.c => deleted_files/usr/src/cmd/sgs/librtld/common/lintsup.c
rename : usr/src/cmd/sgs/rtld/common/_synonyms.h => deleted_files/usr/src/cmd/sgs/rtld/common/_synonyms.h
rename : usr/src/common/atomic/atomic_asm_weak.h => deleted_files/usr/src/common/atomic/atomic_asm_weak.h
rename : usr/src/lib/common/inc/c_synonyms.h => deleted_files/usr/src/lib/common/inc/c_synonyms.h
rename : usr/src/lib/libc/amd64/gen/lexp10.c => deleted_files/usr/src/lib/libc/amd64/gen/lexp10.c
rename : usr/src/lib/libc/amd64/gen/llog10.c => deleted_files/usr/src/lib/libc/amd64/gen/llog10.c
rename : usr/src/lib/libc/amd64/gen/ltostr.c => deleted_files/usr/src/lib/libc/amd64/gen/ltostr.c
rename : usr/src/lib/libc/i386/gen/lexp10.c => deleted_files/usr/src/lib/libc/i386/gen/lexp10.c
rename : usr/src/lib/libc/i386/gen/llog10.c => deleted_files/usr/src/lib/libc/i386/gen/llog10.c
rename : usr/src/lib/libc/i386/gen/ltostr.c => deleted_files/usr/src/lib/libc/i386/gen/ltostr.c
rename : usr/src/lib/libc/inc/synonyms.h => deleted_files/usr/src/lib/libc/inc/synonyms.h
rename : usr/src/lib/libc/sparcv9/gen/lexp10.c => deleted_files/usr/src/lib/libc/sparcv9/gen/lexp10.c
rename : usr/src/lib/libc/sparcv9/gen/llog10.c => deleted_files/usr/src/lib/libc/sparcv9/gen/llog10.c
rename : usr/src/lib/libc_psr/inc.flg => deleted_files/usr/src/lib/libc_psr/inc.flg
rename : usr/src/lib/libcrypt/inc/des_synonyms.h => deleted_files/usr/src/lib/libcrypt/inc/des_synonyms.h
rename : usr/src/lib/libgen/inc/gen_synonyms.h => deleted_files/usr/src/lib/libgen/inc/gen_synonyms.h
rename : usr/src/lib/libtsnet/common/synonyms.h => deleted_files/usr/src/lib/libtsnet/common/synonyms.h
rename : usr/src/tools/scripts/check_fnames.sh => deleted_files/usr/src/tools/scripts/check_fnames.sh
rename : usr/src/lib/libc/sparc/gen/lexp10.c => usr/src/lib/libc/port/gen/lexp10.c
rename : usr/src/lib/libc/sparc/gen/llog10.c => usr/src/lib/libc/port/gen/llog10.c
978 files changed, 8194 insertions, 10226 deletions
diff --git a/usr/src/cmd/sgs/libelf/common/syn.h b/deleted_files/usr/src/cmd/sgs/libelf/common/syn.h index b764176a87..b764176a87 100644 --- a/usr/src/cmd/sgs/libelf/common/syn.h +++ b/deleted_files/usr/src/cmd/sgs/libelf/common/syn.h diff --git a/usr/src/cmd/sgs/librtld/common/lintsup.c b/deleted_files/usr/src/cmd/sgs/librtld/common/lintsup.c index d20585d0b1..d20585d0b1 100644 --- a/usr/src/cmd/sgs/librtld/common/lintsup.c +++ b/deleted_files/usr/src/cmd/sgs/librtld/common/lintsup.c diff --git a/usr/src/cmd/sgs/rtld/common/_synonyms.h b/deleted_files/usr/src/cmd/sgs/rtld/common/_synonyms.h index 8cdf899bd4..8cdf899bd4 100644 --- a/usr/src/cmd/sgs/rtld/common/_synonyms.h +++ b/deleted_files/usr/src/cmd/sgs/rtld/common/_synonyms.h diff --git a/usr/src/common/atomic/atomic_asm_weak.h b/deleted_files/usr/src/common/atomic/atomic_asm_weak.h index cd61376153..cd61376153 100644 --- a/usr/src/common/atomic/atomic_asm_weak.h +++ b/deleted_files/usr/src/common/atomic/atomic_asm_weak.h diff --git a/usr/src/lib/common/inc/c_synonyms.h b/deleted_files/usr/src/lib/common/inc/c_synonyms.h index 17cb17810e..17cb17810e 100644 --- a/usr/src/lib/common/inc/c_synonyms.h +++ b/deleted_files/usr/src/lib/common/inc/c_synonyms.h diff --git a/usr/src/lib/libc/amd64/gen/lexp10.c b/deleted_files/usr/src/lib/libc/amd64/gen/lexp10.c index 122d1aa736..122d1aa736 100644 --- a/usr/src/lib/libc/amd64/gen/lexp10.c +++ b/deleted_files/usr/src/lib/libc/amd64/gen/lexp10.c diff --git a/usr/src/lib/libc/amd64/gen/llog10.c b/deleted_files/usr/src/lib/libc/amd64/gen/llog10.c index 13407fa44a..13407fa44a 100644 --- a/usr/src/lib/libc/amd64/gen/llog10.c +++ b/deleted_files/usr/src/lib/libc/amd64/gen/llog10.c diff --git a/usr/src/lib/libc/amd64/gen/ltostr.c b/deleted_files/usr/src/lib/libc/amd64/gen/ltostr.c index a213156374..a213156374 100644 --- a/usr/src/lib/libc/amd64/gen/ltostr.c +++ b/deleted_files/usr/src/lib/libc/amd64/gen/ltostr.c diff --git a/usr/src/lib/libc/i386/gen/lexp10.c b/deleted_files/usr/src/lib/libc/i386/gen/lexp10.c index b02a328acc..b02a328acc 100644 --- a/usr/src/lib/libc/i386/gen/lexp10.c +++ b/deleted_files/usr/src/lib/libc/i386/gen/lexp10.c diff --git a/usr/src/lib/libc/i386/gen/llog10.c b/deleted_files/usr/src/lib/libc/i386/gen/llog10.c index e4a6f8ac20..e4a6f8ac20 100644 --- a/usr/src/lib/libc/i386/gen/llog10.c +++ b/deleted_files/usr/src/lib/libc/i386/gen/llog10.c diff --git a/usr/src/lib/libc/i386/gen/ltostr.c b/deleted_files/usr/src/lib/libc/i386/gen/ltostr.c index 04129a34ad..04129a34ad 100644 --- a/usr/src/lib/libc/i386/gen/ltostr.c +++ b/deleted_files/usr/src/lib/libc/i386/gen/ltostr.c diff --git a/usr/src/lib/libc/inc/synonyms.h b/deleted_files/usr/src/lib/libc/inc/synonyms.h index ca8e25a41a..ca8e25a41a 100644 --- a/usr/src/lib/libc/inc/synonyms.h +++ b/deleted_files/usr/src/lib/libc/inc/synonyms.h diff --git a/usr/src/lib/libc/sparc/gen/lexp10.c b/deleted_files/usr/src/lib/libc/sparcv9/gen/lexp10.c index 28152a5b8f..28152a5b8f 100644 --- a/usr/src/lib/libc/sparc/gen/lexp10.c +++ b/deleted_files/usr/src/lib/libc/sparcv9/gen/lexp10.c diff --git a/usr/src/lib/libc/sparc/gen/llog10.c b/deleted_files/usr/src/lib/libc/sparcv9/gen/llog10.c index 14f690c61b..14f690c61b 100644 --- a/usr/src/lib/libc/sparc/gen/llog10.c +++ b/deleted_files/usr/src/lib/libc/sparcv9/gen/llog10.c diff --git a/usr/src/lib/libc_psr/inc.flg b/deleted_files/usr/src/lib/libc_psr/inc.flg index 7bd2de9f0a..7bd2de9f0a 100644 --- a/usr/src/lib/libc_psr/inc.flg +++ b/deleted_files/usr/src/lib/libc_psr/inc.flg diff --git a/usr/src/lib/libcrypt/inc/des_synonyms.h b/deleted_files/usr/src/lib/libcrypt/inc/des_synonyms.h index 9761ed275f..9761ed275f 100644 --- a/usr/src/lib/libcrypt/inc/des_synonyms.h +++ b/deleted_files/usr/src/lib/libcrypt/inc/des_synonyms.h diff --git a/usr/src/lib/libgen/inc/gen_synonyms.h b/deleted_files/usr/src/lib/libgen/inc/gen_synonyms.h index de9fa10913..de9fa10913 100644 --- a/usr/src/lib/libgen/inc/gen_synonyms.h +++ b/deleted_files/usr/src/lib/libgen/inc/gen_synonyms.h diff --git a/usr/src/lib/libtsnet/common/synonyms.h b/deleted_files/usr/src/lib/libtsnet/common/synonyms.h index ed28e16910..ed28e16910 100644 --- a/usr/src/lib/libtsnet/common/synonyms.h +++ b/deleted_files/usr/src/lib/libtsnet/common/synonyms.h diff --git a/usr/src/tools/scripts/check_fnames.sh b/deleted_files/usr/src/tools/scripts/check_fnames.sh index f06ef4bb79..f06ef4bb79 100644 --- a/usr/src/tools/scripts/check_fnames.sh +++ b/deleted_files/usr/src/tools/scripts/check_fnames.sh diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index 4983c818f5..f230b99d16 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -184,11 +184,6 @@ XARGS= /usr/bin/xargs ELFEDIT= /usr/bin/elfedit ELFSIGN= /usr/bin/elfsign DTRACE= /usr/sbin/dtrace -CHECK_FNAMES= $(ONBLD_TOOLS)/bin/check_fnames - -# Due to 6367203, objects built with gcc will fail the namespace checks. -# Remove this override once the compiler bug is fixed. -$(__GNUC)CHECK_FNAMES= $(TRUE) FILEMODE= 644 DIRMODE= 755 diff --git a/usr/src/cmd/mdb/common/kmdb/kmdb_dl.c b/usr/src/cmd/mdb/common/kmdb/kmdb_dl.c index adc26d6e95..781f60fc90 100644 --- a/usr/src/cmd/mdb/common/kmdb/kmdb_dl.c +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_dl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -141,10 +140,10 @@ dlsym(void *dlp, const char *name) return (addr); } -#pragma weak dladdr1 = _dladdr1 +#pragma weak _dladdr1 = dladdr1 /*ARGSUSED*/ int -_dladdr1(void *address, Dl_info *dlip, void **info, int flags) +dladdr1(void *address, Dl_info *dlip, void **info, int flags) { /* * umem uses this for debugging information. We'll pretend to fail. diff --git a/usr/src/cmd/mdb/common/kmdb/kmdb_umemglue.c b/usr/src/cmd/mdb/common/kmdb/kmdb_umemglue.c index 655f216797..4193b0dcd5 100644 --- a/usr/src/cmd/mdb/common/kmdb/kmdb_umemglue.c +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_umemglue.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -90,13 +90,13 @@ umem_snprintf(char *s, size_t n, const char *format, ...) /* These aren't atomic, but we're not MT, so it doesn't matter */ uint32_t -umem__atomic_add_32_nv(uint32_t *target, int32_t delta) +umem_atomic_add_32_nv(uint32_t *target, int32_t delta) { return (*target = *target + delta); } void -umem__atomic_add_64(uint64_t *target, int64_t delta) +umem_atomic_add_64(uint64_t *target, int64_t delta) { *target = *target + delta; } diff --git a/usr/src/cmd/mdb/common/libstand/ctime.c b/usr/src/cmd/mdb/common/libstand/ctime.c index 2b67917bde..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 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -168,7 +168,8 @@ __posix_asctime_r(const struct tm *t, char *cbuf) return (NULL); cp = cbuf; - for (ncp = Date; *cp++ = *ncp++; /* */); + for (ncp = Date; *cp++ = *ncp++; /* */) + ; ncp = Day + (3*t->tm_wday); cp = cbuf; *cp++ = *ncp++; @@ -202,7 +203,7 @@ __posix_asctime_r(const struct tm *t, char *cbuf) * It was implemented by Solaris 2.3. */ char * -_asctime_r(const struct tm *t, char *cbuf, int buflen) +asctime_r(const struct tm *t, char *cbuf, int buflen) { if (buflen < CBUFSIZ) { errno = ERANGE; @@ -223,7 +224,7 @@ asctime(const struct tm *t) { static char cbuf[CBUFSIZ]; - return (_asctime_r(t, cbuf, CBUFSIZ)); + return (asctime_r(t, cbuf, CBUFSIZ)); } diff --git a/usr/src/cmd/oamuser/lib/dates.c b/usr/src/cmd/oamuser/lib/dates.c index dc7ef54071..3c8fca2619 100644 --- a/usr/src/cmd/oamuser/lib/dates.c +++ b/usr/src/cmd/oamuser/lib/dates.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,18 @@ * * CDDL HEADER END */ + +/* + * Copyright 2008 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" -#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */ - -#include <time.h> +#include <time.h> extern int putenv(); @@ -33,8 +37,6 @@ static int mask_defined = 0; static char *dmaskpath = "DATEMSK=/etc/datemsk"; -extern int _getdate_err; - /* Parse a date string and return time_t value */ time_t p_getdate( string ) diff --git a/usr/src/cmd/rpld/params.c b/usr/src/cmd/rpld/params.c index abc508fcaf..5c59e60327 100644 --- a/usr/src/cmd/rpld/params.c +++ b/usr/src/cmd/rpld/params.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -113,7 +113,7 @@ parseargs(int argc, char *argv[], char *envp[]) break; case 'f': /* alternate config file */ if (strlcpy(configFile, optarg, - MAXPATHLEN) >= MAXPATHLEN) { + MAXPATHLEN) >= MAXPATHLEN) { printf("Alternate config file too long\n"); return (-1); } @@ -134,7 +134,7 @@ parseargs(int argc, char *argv[], char *envp[]) int i; if (strlcpy(ifName, argv[optind], - MAXPATHLEN) >= MAXPATHLEN) { + MAXPATHLEN) >= MAXPATHLEN) { printf("Network interface name too long\n"); return (-1); } @@ -193,7 +193,7 @@ parseargs(int argc, char *argv[], char *envp[]) break; case 'l': /* alt. log file name */ if (strlcpy(logFile, optarg, - MAXPATHLEN) >= MAXPATHLEN) { + MAXPATHLEN) >= MAXPATHLEN) { printf("Alternate log file too long\n"); return (-1); } @@ -265,10 +265,10 @@ parseargs(int argc, char *argv[], char *envp[]) /* ask IP for the list of configured interfaces */ #ifdef SIOCGIFNUM - if (_ioctl(ip_fd, SIOCGIFNUM, (char *)&numifs) < 0) { + if (ioctl(ip_fd, SIOCGIFNUM, (char *)&numifs) < 0) { if (debugLevel >= MSG_FATAL) { sprintf(debugmsg, - "Failed _ioctl(SIOCGIFNUM)\n"); + "Failed ioctl(SIOCGIFNUM)\n"); senddebug(MSG_FATAL); } close(ip_fd); @@ -292,7 +292,7 @@ parseargs(int argc, char *argv[], char *envp[]) } ifconf.ifc_len = bufsize; ifconf.ifc_buf = (caddr_t)reqbuf; - if (_ioctl(ip_fd, SIOCGIFCONF, (char *)&ifconf) < 0) { + if (ioctl(ip_fd, SIOCGIFCONF, (char *)&ifconf) < 0) { if (debugLevel >= MSG_FATAL) { sprintf(debugmsg, "SIOCGIFCONF failed, -a option failed.\n"); @@ -450,7 +450,7 @@ llc_is_needed(char *devname, int ifUnit) if (debugLevel >= MSG_INFO_1) { sprintf(debugmsg, - "Need to determine if LLC driver is needed\n"); + "Need to determine if LLC driver is needed\n"); senddebug(MSG_INFO_1); } @@ -554,7 +554,7 @@ readconfig(int running) /* Try to use default config file if not already done so */ if (strcmp(configFile, DFT_CONFIGFILE) != 0) { printf("Using the default config file %s\n", - DFT_CONFIGFILE); + DFT_CONFIGFILE); (void) strlcpy(configFile, DFT_CONFIGFILE, MAXPATHLEN); if ((fstr = fopen(configFile, "r")) == NULL) { if (running && debugLevel >= MSG_ERROR_1) { @@ -599,8 +599,8 @@ readconfig(int running) line[i++] = '\0'; /* put NULL after keyword token */ while (line[i] < '0' || line[i] > 'z' || - (line[i] > '9' && line[i] < 'A') || - (line[i] > 'Z' && line[i] < 'a')) + (line[i] > '9' && line[i] < 'A') || + (line[i] > 'Z' && line[i] < 'a')) i++; if (strcmp(line, "DebugLevel") == 0) @@ -646,7 +646,7 @@ readconfig(int running) } else { logFileChange = 0; (void) strlcpy(newLogFile, &line[i], - MAXPATHLEN); + MAXPATHLEN); if (strcmp(newLogFile, logFile) == 0) continue; else @@ -704,7 +704,7 @@ readconfig(int running) } } else { (void) strlcpy(logFile, newLogFile, - MAXPATHLEN); + MAXPATHLEN); setbuf(log_str, (char *)NULL); } break; @@ -743,7 +743,7 @@ open_debug_dest(void) if (log_str == NULL) { if (debugLevel >= MSG_FATAL) { sprintf(debugmsg, "Cannot open log file %s\n", - logFile); + logFile); senddebug(MSG_FATAL); } return (-1); diff --git a/usr/src/cmd/sgs/ldprof/common/profile.c b/usr/src/cmd/sgs/ldprof/common/profile.c index 82139672a2..90573a9adb 100644 --- a/usr/src/cmd/sgs/ldprof/common/profile.c +++ b/usr/src/cmd/sgs/ldprof/common/profile.c @@ -18,34 +18,37 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" /* * Routines to provide profiling of shared libraries required by the called * executable. */ -#include <stdio.h> -#include <fcntl.h> -#include <sys/mman.h> -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <synch.h> -#include <signal.h> -#include <synch.h> -#include <link.h> -#include <sys/param.h> -#include <procfs.h> -#include "msg.h" -#include "sgs.h" -#include "profile.h" -#include "_rtld.h" +#include <stdio.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <unistd.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <synch.h> +#include <signal.h> +#include <synch.h> +#include <link.h> +#include <libintl.h> +#include <sys/param.h> +#include <procfs.h> +#include "msg.h" +#include "sgs.h" +#include "profile.h" +#include "_rtld.h" static char Profile[MAXPATHLEN]; /* Profile buffer pathname */ @@ -89,14 +92,10 @@ prof_mutex_unlock(mutex_t *mp, sigset_t *oset) return (0); } - -extern char *_dgettext(const char *, const char *); - - const char * _ldprof_msg(Msg mid) { - return (_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); + return (dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); } /* @@ -125,7 +124,7 @@ la_version(uint_t version) if (version < LAV_CURRENT) { (void) fprintf(stderr, MSG_INTL(MSG_GEN_AUDITVERSION), - LAV_CURRENT, version); + LAV_CURRENT, version); return (LAV_CURRENT); } @@ -231,7 +230,7 @@ profile_open(const char *fname, Link_map *lmp) dynp = (Dyn *)phdr->p_vaddr; if (fixed == 0) { dynp = (Dyn *)((unsigned long)dynp + - (unsigned long)lpc); + (unsigned long)lpc); } continue; } @@ -242,7 +241,7 @@ profile_open(const char *fname, Link_map *lmp) _hpc = (caddr_t)(phdr->p_vaddr + phdr->p_memsz); if (fixed == 0) { _hpc = (caddr_t)((unsigned long)_hpc + - (unsigned long)lpc); + (unsigned long)lpc); } if (_hpc > hpc) hpc = _hpc; @@ -266,7 +265,7 @@ profile_open(const char *fname, Link_map *lmp) hashp = (unsigned int *)dynp->d_un.d_ptr; if (fixed == 0) { hashp = (unsigned int *)((unsigned long)hashp + - (unsigned long)lpc); + (unsigned long)lpc); } nsym = hashp[1]; break; @@ -369,7 +368,7 @@ profile_open(const char *fname, Link_map *lmp) */ /* LINTED */ profil((unsigned short *)(addr + hsize), - psize, (unsigned long)lpc, (unsigned int) PRF_SCALE); + psize, (unsigned long)lpc, (unsigned int) PRF_SCALE); return (1); } @@ -508,7 +507,7 @@ plt_cg_interp(uint_t ndx, caddr_t from, caddr_t to) fd = open(Profile, O_RDWR, 0); if (remap_profile(fd) == 0) { (void) prof_mutex_unlock((mutex_t *)&Hptr->hd_mutex, - &mask); + &mask); exit(1); } (void) close(fd); @@ -545,7 +544,7 @@ plt_cg_interp(uint_t ndx, caddr_t from, caddr_t to) * entry and link it in. */ while ((cptr->cg_from != from) && - (cptr->cg_from != PRF_UNKNOWN)) { + (cptr->cg_from != PRF_UNKNOWN)) { if (cptr->cg_next != 0) cptr = &Cptr[cptr->cg_next]; else { @@ -584,10 +583,11 @@ plt_cg_interp(uint_t ndx, caddr_t from, caddr_t to) addr = (caddr_t)((Addr)cptr - (Addr)Cptr); if (remap_profile(fd) == 0) { + /* CSTYLED */ (void) prof_mutex_unlock( (mutex_t *)&Hptr-> hd_mutex, &mask); - exit(1); + exit(1); } cptr = (L_cgarc *)((Addr)addr + (Addr)Cptr); diff --git a/usr/src/cmd/sgs/libconv/common/tokens.c b/usr/src/cmd/sgs/libconv/common/tokens.c index 52135e1243..ad114cd47e 100644 --- a/usr/src/cmd/sgs/libconv/common/tokens.c +++ b/usr/src/cmd/sgs/libconv/common/tokens.c @@ -20,19 +20,17 @@ */ /* - * Copyright 2006 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" -#define sysinfo _sysinfo -#define strdup _strdup +#pragma ident "%Z%%M% %I% %E% SMI" -#include <sys/systeminfo.h> -#include <sys/utsname.h> -#include <limits.h> -#include <strings.h> -#include "_conv.h" +#include <sys/systeminfo.h> +#include <sys/utsname.h> +#include <limits.h> +#include <strings.h> +#include "_conv.h" /* * Isalist(1) expansion. diff --git a/usr/src/cmd/sgs/libcrle/common/util.c b/usr/src/cmd/sgs/libcrle/common/util.c index 05626de613..b2647b5e8c 100644 --- a/usr/src/cmd/sgs/libcrle/common/util.c +++ b/usr/src/cmd/sgs/libcrle/common/util.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,27 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1999 by 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" /* LINTLIBRARY */ -#include <stdio.h> -#include "rtc.h" -#include "msg.h" +#include <stdio.h> +#include <libintl.h> +#include "rtc.h" +#include "msg.h" /* - * Messaging support - funnel everything through _dgettext() as this provides - * a stub binding to libc, or a real binding to libintl. + * Messaging support - funnel everything through dgettext(). */ -extern char * _dgettext(const char *, const char *); const char * _libcrle_msg(Msg mid) { - return (_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); + return (dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); } diff --git a/usr/src/cmd/sgs/libelf/common/ar.c b/usr/src/cmd/sgs/libelf/common/ar.c index f01e2b1427..9cfa68ad4f 100644 --- a/usr/src/cmd/sgs/libelf/common/ar.c +++ b/usr/src/cmd/sgs/libelf/common/ar.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,19 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1988 AT&T - * - * All Rights Reserved - * + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ /* - * Copyright (c) 1999 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright (c) 1988 AT&T + * All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6 */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <ar.h> #include <stdlib.h> #include <memory.h> @@ -100,7 +97,7 @@ static const char fmag[] = ARFMAG; * Returns the converted integer of the string being scaned. */ unsigned long -_elf_number(char * p, char * end, int base) +_elf_number(char *p, char *end, int base) { register unsigned c; register unsigned long n = 0; @@ -125,7 +122,7 @@ _elf_number(char * p, char * end, int base) * Converts ascii file representation to the binary memory values. */ Member * -_elf_armem(Elf * elf, char * file, size_t fsz) +_elf_armem(Elf *elf, char *file, size_t fsz) { register struct ar_hdr *f = (struct ar_hdr *)file; register Member *m; @@ -167,7 +164,7 @@ _elf_armem(Elf * elf, char * file, size_t fsz) l->m_next = 0; l->m_free = (Memident *)(l + 1); l->m_end = (Memident *)((uintptr_t)l->m_free + - (sizeof (Memident) * MEMIDENTNO)); + (sizeof (Memident) * MEMIDENTNO)); if (elf->ed_memlist == 0) elf->ed_memlist = l; @@ -205,7 +202,7 @@ _elf_armem(Elf * elf, char * file, size_t fsz) register unsigned long j; j = _elf_number(&f->ar_name[1], - &f->ar_name[ARSZ(ar_name)], 10); + &f->ar_name[ARSZ(ar_name)], 10); if (j < elf->ed_arstrsz) m->m_hdr.ar_name = elf->ed_arstr + j; else { @@ -224,18 +221,18 @@ _elf_armem(Elf * elf, char * file, size_t fsz) } m->m_hdr.ar_date = (time_t)_elf_number(f->ar_date, - &f->ar_date[ARSZ(ar_date)], 10); + &f->ar_date[ARSZ(ar_date)], 10); /* LINTED */ m->m_hdr.ar_uid = (uid_t)_elf_number(f->ar_uid, - &f->ar_uid[ARSZ(ar_uid)], 10); + &f->ar_uid[ARSZ(ar_uid)], 10); /* LINTED */ m->m_hdr.ar_gid = (gid_t)_elf_number(f->ar_gid, - &f->ar_gid[ARSZ(ar_gid)], 10); + &f->ar_gid[ARSZ(ar_gid)], 10); /* LINTED */ m->m_hdr.ar_mode = (mode_t)_elf_number(f->ar_mode, - &f->ar_mode[ARSZ(ar_mode)], 8); + &f->ar_mode[ARSZ(ar_mode)], 8); m->m_hdr.ar_size = (off_t)_elf_number(f->ar_size, - &f->ar_size[ARSZ(ar_size)], 10); + &f->ar_size[ARSZ(ar_size)], 10); return (m); } @@ -260,11 +257,11 @@ _elf_armem(Elf * elf, char * file, size_t fsz) void _elf_arinit(Elf * elf) { - char * base = elf->ed_ident; - register char * end = base + elf->ed_fsz; - register struct ar_hdr * a; - register char * hdr = base + SARMAG; - register char * mem; + char *base = elf->ed_ident; + register char *end = base + elf->ed_fsz; + register struct ar_hdr *a; + register char *hdr = base + SARMAG; + register char *mem; int j; size_t sz = SARMAG; @@ -298,7 +295,7 @@ _elf_arinit(Elf * elf) sz) != OK_YES) return; if (elf->ed_vm == 0) { - char * nmem; + char *nmem; if ((nmem = malloc(sz)) == 0) { _elf_seterr(EMEM_ARSTR, errno); return; diff --git a/usr/src/cmd/sgs/libelf/common/begin.c b/usr/src/cmd/sgs/libelf/common/begin.c index 48cc7942a5..d4e3639207 100644 --- a/usr/src/cmd/sgs/libelf/common/begin.c +++ b/usr/src/cmd/sgs/libelf/common/begin.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,19 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1988 AT&T - * All Rights Reserved - * + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ /* - * Copyright (c) 1998 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright (c) 1988 AT&T + * All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.13 */ - -#pragma weak elf_begin = _elf_begin -#pragma weak elf_memory = _elf_memory - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <ar.h> #include <stdlib.h> #include <memory.h> @@ -138,7 +132,7 @@ _elf_regular(int fd, unsigned flags) /* initialize regular file */ Elf * _elf_config(Elf * elf) { - char * base; + char *base; unsigned encode; ELFRWLOCKINIT(&elf->ed_rwlock); @@ -202,7 +196,7 @@ _elf_config(Elf * elf) } Elf * -elf_memory(char * image, size_t sz) +elf_memory(char *image, size_t sz) { Elf *elf; unsigned work; @@ -325,7 +319,7 @@ elf_begin(int fd, Elf_Cmd cmd, Elf *ref) case ELF_C_IMAGE: if (ref) { - char * image; + char *image; size_t imagesz; ELFRLOCK(ref); if ((image = ref->ed_wrimage) == 0) { diff --git a/usr/src/cmd/sgs/libelf/common/checksum.c b/usr/src/cmd/sgs/libelf/common/checksum.c index 2bb2d8041f..780c1f2c16 100644 --- a/usr/src/cmd/sgs/libelf/common/checksum.c +++ b/usr/src/cmd/sgs/libelf/common/checksum.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,7 +32,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <errno.h> #include <libelf.h> #include "decl.h" diff --git a/usr/src/cmd/sgs/libelf/common/clscook.c b/usr/src/cmd/sgs/libelf/common/clscook.c index 66c5150cbe..f43d9a688c 100644 --- a/usr/src/cmd/sgs/libelf/common/clscook.c +++ b/usr/src/cmd/sgs/libelf/common/clscook.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" /* @@ -36,8 +35,6 @@ * comment in cook.c for more info. */ - -#include "syn.h" #include <string.h> #include <ar.h> #include <stdlib.h> diff --git a/usr/src/cmd/sgs/libelf/common/cntl.c b/usr/src/cmd/sgs/libelf/common/cntl.c index 581287f559..f3b59b1671 100644 --- a/usr/src/cmd/sgs/libelf/common/cntl.c +++ b/usr/src/cmd/sgs/libelf/common/cntl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.4 */ - -#pragma weak elf_cntl = _elf_cntl +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" - int elf_cntl(Elf * elf, Elf_Cmd cmd) { diff --git a/usr/src/cmd/sgs/libelf/common/cook.c b/usr/src/cmd/sgs/libelf/common/cook.c index 8e130b75b1..746a2285b5 100644 --- a/usr/src/cmd/sgs/libelf/common/cook.c +++ b/usr/src/cmd/sgs/libelf/common/cook.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.10 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <string.h> #include <ar.h> #include <stdlib.h> diff --git a/usr/src/cmd/sgs/libelf/common/data.c b/usr/src/cmd/sgs/libelf/common/data.c index 2d3b108cd6..95b4401354 100644 --- a/usr/src/cmd/sgs/libelf/common/data.c +++ b/usr/src/cmd/sgs/libelf/common/data.c @@ -19,22 +19,19 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.3 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <libelf.h> #include "decl.h" - /* * Global data * _elf_byte Fill byte for file padding. See elf_fill(). diff --git a/usr/src/cmd/sgs/libelf/common/end.c b/usr/src/cmd/sgs/libelf/common/end.c index 2b59b6e6bd..134c8ac25e 100644 --- a/usr/src/cmd/sgs/libelf/common/end.c +++ b/usr/src/cmd/sgs/libelf/common/end.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,29 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.11 */ - -#pragma weak elf_end = _elf_end - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <ar.h> #include <stdlib.h> #include "libelf.h" #include "decl.h" #include "member.h" - int elf_end(Elf * elf) { diff --git a/usr/src/cmd/sgs/libelf/common/error.c b/usr/src/cmd/sgs/libelf/common/error.c index 5b5a3d4d1b..21433d05eb 100644 --- a/usr/src/cmd/sgs/libelf/common/error.c +++ b/usr/src/cmd/sgs/libelf/common/error.c @@ -20,23 +20,19 @@ */ /* - * Copyright 2007 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" /* SVr4.0 1.16 */ +#pragma ident "%Z%%M% %I% %E% SMI" - -#pragma weak elf_errmsg = _elf_errmsg -#pragma weak elf_errno = _elf_errno - -#include "syn.h" #include <thread.h> #include <pthread.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <libelf.h> +#include <libintl.h> #include "msg.h" #include "decl.h" @@ -94,13 +90,11 @@ thr_keycreate_once(thread_key_t *keyp, void (*destructor)(void *)) #endif /* NATIVE_BUILD */ -extern char *_dgettext(const char *, const char *); - const char * _libelf_msg(Msg mid) { - return (_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); + return (dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); } diff --git a/usr/src/cmd/sgs/libelf/common/fill.c b/usr/src/cmd/sgs/libelf/common/fill.c index 6a76876da7..bc310148d4 100644 --- a/usr/src/cmd/sgs/libelf/common/fill.c +++ b/usr/src/cmd/sgs/libelf/common/fill.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.2 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak elf_fill = _elf_fill +#pragma ident "%Z%%M% %I% %E% SMI" #include <libelf.h> -#include "syn.h" #include "decl.h" diff --git a/usr/src/cmd/sgs/libelf/common/flag.c b/usr/src/cmd/sgs/libelf/common/flag.c index 3cb47244c5..173d517242 100644 --- a/usr/src/cmd/sgs/libelf/common/flag.c +++ b/usr/src/cmd/sgs/libelf/common/flag.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.6 */ - -#pragma weak elf_flagdata = _elf_flagdata -#pragma weak elf_flagehdr = _elf_flagehdr -#pragma weak elf_flagelf = _elf_flagelf -#pragma weak elf_flagphdr = _elf_flagphdr -#pragma weak elf_flagscn = _elf_flagscn -#pragma weak elf_flagshdr = _elf_flagshdr +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/getarhdr.c b/usr/src/cmd/sgs/libelf/common/getarhdr.c index 6398a11afe..4b48e153d1 100644 --- a/usr/src/cmd/sgs/libelf/common/getarhdr.c +++ b/usr/src/cmd/sgs/libelf/common/getarhdr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,18 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 2000 by 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" /* SVr4.0 1.7 */ - -#pragma weak elf_getarhdr = _elf_getarhdr +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #include <ar.h> -#include "syn.h" #include "libelf.h" #include "decl.h" #include "member.h" diff --git a/usr/src/cmd/sgs/libelf/common/getarsym.c b/usr/src/cmd/sgs/libelf/common/getarsym.c index 66f353fcbf..0163ef06ae 100644 --- a/usr/src/cmd/sgs/libelf/common/getarsym.c +++ b/usr/src/cmd/sgs/libelf/common/getarsym.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.6 */ - -#pragma weak elf_getarsym = _elf_getarsym - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <stdlib.h> #include <errno.h> #include <libelf.h> @@ -62,7 +56,7 @@ static Elf_Void *arsym _((Byte *, size_t, size_t *)); Elf_Void * -arsym(Byte * off, size_t sz, size_t * e) +arsym(Byte *off, size_t sz, size_t *e) { char *endstr = (char *)off + sz; register char *str; @@ -127,11 +121,11 @@ arsym(Byte * off, size_t sz, size_t * e) Elf_Arsym * -elf_getarsym(Elf * elf, size_t * ptr) +elf_getarsym(Elf *elf, size_t *ptr) { - Byte * as; + Byte *as; size_t sz; - Elf_Arsym * rc; + Elf_Arsym *rc; if (ptr != 0) *ptr = 0; diff --git a/usr/src/cmd/sgs/libelf/common/getbase.c b/usr/src/cmd/sgs/libelf/common/getbase.c index 08bcb9557b..44d6c9eb15 100644 --- a/usr/src/cmd/sgs/libelf/common/getbase.c +++ b/usr/src/cmd/sgs/libelf/common/getbase.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.6 */ - -#pragma weak elf_getbase = _elf_getbase +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" diff --git a/usr/src/cmd/sgs/libelf/common/getdata.c b/usr/src/cmd/sgs/libelf/common/getdata.c index 67e4dd549c..52ff4c0761 100644 --- a/usr/src/cmd/sgs/libelf/common/getdata.c +++ b/usr/src/cmd/sgs/libelf/common/getdata.c @@ -18,23 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.16 */ - - -#pragma weak elf_getdata = _elf_getdata - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <stdlib.h> #include <assert.h> #include <errno.h> @@ -265,9 +259,9 @@ _elf_locked_getdata(Elf_Scn * scn, Elf_Data * data) if (d->db_data.d_size <= src.d_size) { d->db_data.d_buf = (Elf_Void *)(elf->ed_ident + - d->db_off); + d->db_off); if (((uintptr_t)d->db_data.d_buf - % ALIGN(elf)[d->db_data.d_type]) == 0) { + % ALIGN(elf)[d->db_data.d_type]) == 0) { break; } else { /* Failure: Restore NULL buffer pointer */ d->db_data.d_buf = 0; diff --git a/usr/src/cmd/sgs/libelf/common/getehdr.c b/usr/src/cmd/sgs/libelf/common/getehdr.c index 4b47241bf8..d20a93651f 100644 --- a/usr/src/cmd/sgs/libelf/common/getehdr.c +++ b/usr/src/cmd/sgs/libelf/common/getehdr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.8 */ - - -#pragma weak elf32_getehdr = _elf32_getehdr - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/getident.c b/usr/src/cmd/sgs/libelf/common/getident.c index 516e89b315..b51c2dc5d2 100644 --- a/usr/src/cmd/sgs/libelf/common/getident.c +++ b/usr/src/cmd/sgs/libelf/common/getident.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,29 +18,26 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.8 */ - -#pragma weak elf_getident = _elf_getident +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" char * -elf_getident(Elf * elf, size_t * ptr) +elf_getident(Elf *elf, size_t *ptr) { size_t sz = 0; - char * id = 0; + char *id = 0; if (elf != 0) { ELFRLOCK(elf) diff --git a/usr/src/cmd/sgs/libelf/common/getphdr.c b/usr/src/cmd/sgs/libelf/common/getphdr.c index cff8839f63..0e0aaf67d3 100644 --- a/usr/src/cmd/sgs/libelf/common/getphdr.c +++ b/usr/src/cmd/sgs/libelf/common/getphdr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.10 */ - -#pragma weak elf32_getphdr = _elf32_getphdr - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/getscn.c b/usr/src/cmd/sgs/libelf/common/getscn.c index f5090ab86c..2416f2cfb4 100644 --- a/usr/src/cmd/sgs/libelf/common/getscn.c +++ b/usr/src/cmd/sgs/libelf/common/getscn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.10 */ - -#pragma weak elf_getscn = _elf_getscn +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/getshdr.c b/usr/src/cmd/sgs/libelf/common/getshdr.c index 76dad9da5a..910bad0852 100644 --- a/usr/src/cmd/sgs/libelf/common/getshdr.c +++ b/usr/src/cmd/sgs/libelf/common/getshdr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.4 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak elf32_getshdr = _elf32_getshdr +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/hash.c b/usr/src/cmd/sgs/libelf/common/hash.c index 45dbc464ce..f7d57f4e80 100644 --- a/usr/src/cmd/sgs/libelf/common/hash.c +++ b/usr/src/cmd/sgs/libelf/common/hash.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,28 +18,22 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 2000 by 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" /* SVr4.0 1.4 */ - -#pragma weak elf_hash = _elf_hash - - -#include "syn.h" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * The elf_hash() routine as defined by the gABI */ unsigned long -elf_hash(const char * ename) +elf_hash(const char *ename) { unsigned int hval = 0; diff --git a/usr/src/cmd/sgs/libelf/common/input.c b/usr/src/cmd/sgs/libelf/common/input.c index 8a4b950346..b9dcaac864 100644 --- a/usr/src/cmd/sgs/libelf/common/input.c +++ b/usr/src/cmd/sgs/libelf/common/input.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.5 */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <unistd.h> #include <stdlib.h> #include <memory.h> @@ -274,7 +271,7 @@ _elf_inmap(Elf * elf) void -_elf_unmap(char * p, size_t sz) +_elf_unmap(char *p, size_t sz) { if (p == 0 || sz == 0) return; diff --git a/usr/src/cmd/sgs/libelf/common/kind.c b/usr/src/cmd/sgs/libelf/common/kind.c index 0c9c31421b..e4f22addde 100644 --- a/usr/src/cmd/sgs/libelf/common/kind.c +++ b/usr/src/cmd/sgs/libelf/common/kind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.4 */ - -#pragma weak elf_kind = _elf_kind +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" diff --git a/usr/src/cmd/sgs/libelf/common/llib-lelf b/usr/src/cmd/sgs/libelf/common/llib-lelf index 291282b513..2f6c6db9e2 100644 --- a/usr/src/cmd/sgs/libelf/common/llib-lelf +++ b/usr/src/cmd/sgs/libelf/common/llib-lelf @@ -18,8 +18,6 @@ * * CDDL HEADER END */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. @@ -28,6 +26,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" +/* LINTLIBRARY */ +/* PROTOLIB1 */ + /* * Generic interface definition for usr/src/lib/libelf. */ @@ -41,21 +42,13 @@ * Elf32 Symbols */ size_t elf32_fsize(Elf_Type, size_t, uint_t); -size_t _elf32_fsize(Elf_Type, size_t, uint_t); Elf32_Ehdr * elf32_getehdr(Elf *); -Elf32_Ehdr * _elf32_getehdr(Elf *); Elf32_Phdr * elf32_getphdr(Elf *); -Elf32_Phdr * _elf32_getphdr(Elf *); Elf32_Shdr * elf32_getshdr(Elf_Scn *); -Elf32_Shdr * _elf32_getshdr(Elf_Scn *); Elf32_Ehdr * elf32_newehdr(Elf *); -Elf32_Ehdr * _elf32_newehdr(Elf *); Elf32_Phdr * elf32_newphdr(Elf *, size_t); -Elf32_Phdr * _elf32_newphdr(Elf *, size_t); Elf_Data * elf32_xlatetof(Elf_Data *, const Elf_Data *, uint_t); -Elf_Data * _elf32_xlatetof(Elf_Data *, const Elf_Data *, uint_t); Elf_Data * elf32_xlatetom(Elf_Data *, const Elf_Data *, uint_t); -Elf_Data * _elf32_xlatetom(Elf_Data *, const Elf_Data *, uint_t); /* @@ -111,73 +104,41 @@ GElf_Xword _gelf_getdyndtflags_1(Elf *); * Class-Independent Elf Symbols */ Elf * elf_begin(int, Elf_Cmd, Elf *); -Elf * _elf_begin(int, Elf_Cmd, Elf *); int elf_cntl(Elf *, Elf_Cmd); -int _elf_cntl(Elf *, Elf_Cmd); int elf_end(Elf *); -int _elf_end(Elf *); const char * elf_errmsg(int); -const char * _elf_errmsg(int); int elf_errno(void); -int _elf_errno(void); void elf_fill(int); -void _elf_fill(int); uint_t elf_flagdata(Elf_Data *, Elf_Cmd, uint_t); -uint_t _elf_flagdata(Elf_Data *, Elf_Cmd, uint_t); uint_t elf_flagehdr(Elf *, Elf_Cmd, uint_t); -uint_t _elf_flagehdr(Elf *, Elf_Cmd, uint_t); uint_t elf_flagelf(Elf *, Elf_Cmd, uint_t); -uint_t _elf_flagelf(Elf *, Elf_Cmd, uint_t); uint_t elf_flagphdr(Elf *, Elf_Cmd, uint_t); -uint_t _elf_flagphdr(Elf *, Elf_Cmd, uint_t); uint_t elf_flagscn(Elf_Scn *, Elf_Cmd, uint_t); -uint_t _elf_flagscn(Elf_Scn *, Elf_Cmd, uint_t); uint_t elf_flagshdr(Elf_Scn *, Elf_Cmd, uint_t); -uint_t _elf_flagshdr(Elf_Scn *, Elf_Cmd, uint_t); Elf_Arhdr * elf_getarhdr(Elf *); -Elf_Arhdr * _elf_getarhdr(Elf *); Elf_Arsym * elf_getarsym(Elf *, size_t *); -Elf_Arsym * _elf_getarsym(Elf *, size_t *); off_t elf_getbase(Elf *); -off_t _elf_getbase(Elf *); Elf_Data * elf_getdata(Elf_Scn *, Elf_Data *); -Elf_Data * _elf_getdata(Elf_Scn *, Elf_Data *); char * elf_getident(Elf *, size_t *); -char * _elf_getident(Elf *, size_t *); int elf_getphnum(Elf *, size_t *); int elf_getshnum(Elf *, size_t *); int elf_getshstrndx(Elf *, size_t *); Elf_Scn * elf_getscn(Elf *elf, size_t); -Elf_Scn * _elf_getscn(Elf *elf, size_t); ulong_t elf_hash(const char *); -ulong_t _elf_hash(const char *); Elf_Kind elf_kind(Elf *); -Elf_Kind _elf_kind(Elf *); Elf * elf_memory(char *, size_t); -Elf * _elf_memory(char *, size_t); size_t elf_ndxscn(Elf_Scn *); -size_t _elf_ndxscn(Elf_Scn *); Elf_Data * elf_newdata(Elf_Scn *); -Elf_Data * _elf_newdata(Elf_Scn *); Elf_Scn * elf_newscn(Elf *); -Elf_Scn * _elf_newscn(Elf *); Elf_Cmd elf_next(Elf *); -Elf_Cmd _elf_next(Elf *); Elf_Scn * elf_nextscn(Elf *, Elf_Scn *); -Elf_Scn * _elf_nextscn(Elf *, Elf_Scn *); size_t _elf_outsync(int, char *, size_t, uint_t); size_t elf_rand(Elf *, size_t); -size_t _elf_rand(Elf *, size_t); Elf_Data * elf_rawdata(Elf_Scn *, Elf_Data *); -Elf_Data * _elf_rawdata(Elf_Scn *, Elf_Data *); char * elf_rawfile(Elf *, size_t *); -char * _elf_rawfile(Elf *, size_t *); char * elf_strptr(Elf *, size_t, size_t); -char * _elf_strptr(Elf *, size_t, size_t); off_t elf_update(Elf *, Elf_Cmd); -off_t _elf_update(Elf *, Elf_Cmd); uint_t elf_version(uint_t); -uint_t _elf_version(uint_t); int nlist(const char *, struct nlist *); diff --git a/usr/src/cmd/sgs/libelf/common/mapfile-common b/usr/src/cmd/sgs/libelf/common/mapfile-common index 036ca3ec6a..3c94d62341 100644 --- a/usr/src/cmd/sgs/libelf/common/mapfile-common +++ b/usr/src/cmd/sgs/libelf/common/mapfile-common @@ -18,7 +18,6 @@ # # CDDL HEADER END # - # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. @@ -144,47 +143,7 @@ SUNWprivate_1.1 { global: _elf_getxoff; _elf_outsync; - _elf_begin = NODYNSORT; - _elf_memory = NODYNSORT; - _elf_cntl = NODYNSORT; - _elf_end = NODYNSORT; - _elf_errno = NODYNSORT; - _elf_errmsg = NODYNSORT; - _elf_fill = NODYNSORT; - _elf_flagdata = NODYNSORT; - _elf_flagehdr = NODYNSORT; - _elf_flagelf = NODYNSORT; - _elf_flagphdr = NODYNSORT; - _elf_flagscn = NODYNSORT; - _elf_flagshdr = NODYNSORT; - _elf_getarhdr = NODYNSORT; - _elf_getarsym = NODYNSORT; - _elf_getbase = NODYNSORT; - _elf_getdata = NODYNSORT; - _elf32_getehdr = NODYNSORT; - _elf_getident = NODYNSORT; - _elf32_getphdr = NODYNSORT; - _elf_getscn = NODYNSORT; - _elf32_getshdr = NODYNSORT; - _elf_hash = NODYNSORT; _elf_sys_encoding; - _elf_kind = NODYNSORT; - _elf_ndxscn = NODYNSORT; - _elf_newdata = NODYNSORT; - _elf32_newehdr = NODYNSORT; - _elf32_newphdr = NODYNSORT; - _elf_newscn = NODYNSORT; - _elf_next = NODYNSORT; - _elf_nextscn = NODYNSORT; - _elf_rand = NODYNSORT; - _elf_rawdata = NODYNSORT; - _elf_rawfile = NODYNSORT; - _elf_strptr = NODYNSORT; _elf_swap_wrimage; - _elf_update = NODYNSORT; - _elf32_fsize = NODYNSORT; - _elf32_xlatetof = NODYNSORT; - _elf32_xlatetom = NODYNSORT; - _elf_version = NODYNSORT; _gelf_getdyndtflags_1; }; diff --git a/usr/src/cmd/sgs/libelf/common/ndxscn.c b/usr/src/cmd/sgs/libelf/common/ndxscn.c index 0942abd121..c37abfeb4f 100644 --- a/usr/src/cmd/sgs/libelf/common/ndxscn.c +++ b/usr/src/cmd/sgs/libelf/common/ndxscn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.2 */ - -#pragma weak elf_ndxscn = _elf_ndxscn - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" diff --git a/usr/src/cmd/sgs/libelf/common/newdata.c b/usr/src/cmd/sgs/libelf/common/newdata.c index c0921396a7..dfca71ffdc 100644 --- a/usr/src/cmd/sgs/libelf/common/newdata.c +++ b/usr/src/cmd/sgs/libelf/common/newdata.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.2 */ - -#pragma weak elf_newdata = _elf_newdata - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/newehdr.c b/usr/src/cmd/sgs/libelf/common/newehdr.c index fe85f1ad73..1e7807804b 100644 --- a/usr/src/cmd/sgs/libelf/common/newehdr.c +++ b/usr/src/cmd/sgs/libelf/common/newehdr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#if !defined(_ELF64) -#pragma weak elf32_newehdr = _elf32_newehdr -#endif +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <stdlib.h> #include <errno.h> #include "decl.h" @@ -60,7 +54,7 @@ #define ELFCLASS ELFCLASS32 #define _elf_ehdr_init _elf32_ehdr_init -#define elf_newehdr _elf32_newehdr +#define elf_newehdr elf32_newehdr #define getehdr elf32_getehdr #endif /* ELF64 */ @@ -69,7 +63,6 @@ Ehdr * elf_newehdr(Elf * elf) { - register Ehdr *eh; if (elf == 0) diff --git a/usr/src/cmd/sgs/libelf/common/newphdr.c b/usr/src/cmd/sgs/libelf/common/newphdr.c index 6148923d8f..095a52d278 100644 --- a/usr/src/cmd/sgs/libelf/common/newphdr.c +++ b/usr/src/cmd/sgs/libelf/common/newphdr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#if !defined(_ELF64) -#pragma weak elf32_newphdr = _elf32_newphdr -#endif +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <stdlib.h> #include <memory.h> #include <errno.h> diff --git a/usr/src/cmd/sgs/libelf/common/newscn.c b/usr/src/cmd/sgs/libelf/common/newscn.c index aac275280e..e765d0badb 100644 --- a/usr/src/cmd/sgs/libelf/common/newscn.c +++ b/usr/src/cmd/sgs/libelf/common/newscn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.4 */ - -#pragma weak elf_newscn = _elf_newscn +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/next.c b/usr/src/cmd/sgs/libelf/common/next.c index 08dc32cf44..307a7d0719 100644 --- a/usr/src/cmd/sgs/libelf/common/next.c +++ b/usr/src/cmd/sgs/libelf/common/next.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.5 */ - -#pragma weak elf_next = _elf_next +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" diff --git a/usr/src/cmd/sgs/libelf/common/nextscn.c b/usr/src/cmd/sgs/libelf/common/nextscn.c index 7c9bbb3ab8..f967498b5d 100644 --- a/usr/src/cmd/sgs/libelf/common/nextscn.c +++ b/usr/src/cmd/sgs/libelf/common/nextscn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.2 */ - -#pragma weak elf_nextscn = _elf_nextscn +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" diff --git a/usr/src/cmd/sgs/libelf/common/output.c b/usr/src/cmd/sgs/libelf/common/output.c index 305a677ffd..a167a50675 100644 --- a/usr/src/cmd/sgs/libelf/common/output.c +++ b/usr/src/cmd/sgs/libelf/common/output.c @@ -20,16 +20,17 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 1988 AT&T * All Rights Reserved - * - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <sys/mman.h> #include <stdio.h> #include <stdlib.h> diff --git a/usr/src/cmd/sgs/libelf/common/rand.c b/usr/src/cmd/sgs/libelf/common/rand.c index 4565ca1ea9..b0f264c3de 100644 --- a/usr/src/cmd/sgs/libelf/common/rand.c +++ b/usr/src/cmd/sgs/libelf/common/rand.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.2 */ - -#pragma weak elf_rand = _elf_rand +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" diff --git a/usr/src/cmd/sgs/libelf/common/rawdata.c b/usr/src/cmd/sgs/libelf/common/rawdata.c index 37858f469c..9feec06e17 100644 --- a/usr/src/cmd/sgs/libelf/common/rawdata.c +++ b/usr/src/cmd/sgs/libelf/common/rawdata.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1999 by 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" /* SVr4.0 1.3 */ - -#pragma weak elf_rawdata = _elf_rawdata - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <stdlib.h> #include "libelf.h" #include "decl.h" @@ -122,7 +116,7 @@ elf_rawdata(Elf_Scn * scn, Elf_Data * data) return (rc); } raw->db_buf = (Elf_Void *)_elf_read(elf->ed_fd, - elf->ed_baseoff + d->db_off, d->db_fsz); + elf->ed_baseoff + d->db_off, d->db_fsz); if (raw->db_buf == 0) { free(raw); READUNLOCKS(elf, scn) diff --git a/usr/src/cmd/sgs/libelf/common/rawfile.c b/usr/src/cmd/sgs/libelf/common/rawfile.c index 583d93d072..b695b7f726 100644 --- a/usr/src/cmd/sgs/libelf/common/rawfile.c +++ b/usr/src/cmd/sgs/libelf/common/rawfile.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,28 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.4 */ - -#pragma weak elf_rawfile = _elf_rawfile - +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" char * -elf_rawfile(Elf * elf, size_t * ptr) +elf_rawfile(Elf *elf, size_t *ptr) { register size_t sz; char *p = 0; diff --git a/usr/src/cmd/sgs/libelf/common/rawput.c b/usr/src/cmd/sgs/libelf/common/rawput.c index 523b546a87..d01ae0a272 100644 --- a/usr/src/cmd/sgs/libelf/common/rawput.c +++ b/usr/src/cmd/sgs/libelf/common/rawput.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.2 */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <stdlib.h> #include <unistd.h> #include <errno.h> diff --git a/usr/src/cmd/sgs/libelf/common/strptr.c b/usr/src/cmd/sgs/libelf/common/strptr.c index 3242415352..05b00a17dc 100644 --- a/usr/src/cmd/sgs/libelf/common/strptr.c +++ b/usr/src/cmd/sgs/libelf/common/strptr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,17 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright (c) 1998 by 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" /* SVr4.0 1.6 */ - -#pragma weak elf_strptr = _elf_strptr +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include "libelf.h" #include "decl.h" #include "msg.h" @@ -42,9 +37,9 @@ char * elf_strptr(Elf * elf, size_t ndx, size_t off) { - Elf_Scn * s; - Elf_Data * d; - char * rc; + Elf_Scn *s; + Elf_Data *d; + char *rc; if (elf == 0) return (0); diff --git a/usr/src/cmd/sgs/libelf/common/update.c b/usr/src/cmd/sgs/libelf/common/update.c index d9390de4ab..18d6281077 100644 --- a/usr/src/cmd/sgs/libelf/common/update.c +++ b/usr/src/cmd/sgs/libelf/common/update.c @@ -20,21 +20,17 @@ */ /* - * Copyright (c) 1988 AT&T - * All Rights Reserved - * - * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 1988 AT&T + * All Rights Reserved + */ -#if !defined(_ELF64) -#pragma weak elf_update = _elf_update -#endif +#pragma ident "%Z%%M% %I% %E% SMI" -#include "syn.h" #include <memory.h> #include <malloc.h> #include <limits.h> diff --git a/usr/src/cmd/sgs/libelf/common/xlate.m4 b/usr/src/cmd/sgs/libelf/common/xlate.m4 index f7cd3beddd..2c3bbab191 100644 --- a/usr/src/cmd/sgs/libelf/common/xlate.m4 +++ b/usr/src/cmd/sgs/libelf/common/xlate.m4 @@ -20,18 +20,12 @@ */ /* - * Copyright 2007 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" -#pragma weak elf32_fsize = _elf32_fsize -#pragma weak elf_version = _elf_version -#pragma weak elf32_xlatetof = _elf32_xlatetof -#pragma weak elf32_xlatetom = _elf32_xlatetom - -#include "syn.h" #include <memory.h> #include <libelf.h> #include <link.h> diff --git a/usr/src/cmd/sgs/libelf/common/xlate64.m4 b/usr/src/cmd/sgs/libelf/common/xlate64.m4 index c1cede3f13..26375f2bb6 100644 --- a/usr/src/cmd/sgs/libelf/common/xlate64.m4 +++ b/usr/src/cmd/sgs/libelf/common/xlate64.m4 @@ -20,13 +20,12 @@ */ /* - * Copyright 2007 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" -#include "syn.h" #include <memory.h> #include <libelf.h> #include <link.h> diff --git a/usr/src/cmd/sgs/libld/common/util.c b/usr/src/cmd/sgs/libld/common/util.c index bf85c4de0e..2c2c83c0b8 100644 --- a/usr/src/cmd/sgs/libld/common/util.c +++ b/usr/src/cmd/sgs/libld/common/util.c @@ -20,29 +20,33 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 1988 AT&T * All Rights Reserved - * - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* * Utility functions */ -#include <unistd.h> -#include <stdio.h> -#include <stdarg.h> -#include <string.h> -#include <fcntl.h> -#include <sys/types.h> -#include <sys/mman.h> -#include <errno.h> -#include <sgs.h> -#include <debug.h> -#include "msg.h" -#include "_libld.h" +#include <unistd.h> +#include <stdio.h> +#include <stdarg.h> +#include <string.h> +#include <fcntl.h> +#include <sys/types.h> +#include <sys/mman.h> +#include <errno.h> +#include <sgs.h> +#include <libintl.h> +#include <debug.h> +#include "msg.h" +#include "_libld.h" /* * libld_malloc() and dz_map() are used for both performance and for ease of @@ -436,15 +440,13 @@ add_string(char *old, char *str) } /* - * Messaging support - funnel everything through _dgettext() as this provides - * a stub binding to libc, or a real binding to libintl. + * Messaging support - funnel everything through dgettext(). */ -extern char *_dgettext(const char *, const char *); const char * _libld_msg(Msg mid) { - return (_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); + return (dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); } /* diff --git a/usr/src/cmd/sgs/liblddbg/common/debug.c b/usr/src/cmd/sgs/liblddbg/common/debug.c index 903f23cae4..3953ea403c 100644 --- a/usr/src/cmd/sgs/liblddbg/common/debug.c +++ b/usr/src/cmd/sgs/liblddbg/common/debug.c @@ -23,19 +23,18 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#define dgettext _dgettext +#pragma ident "%Z%%M% %I% %E% SMI" -#include <libintl.h> -#include <sys/varargs.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <alist.h> -#include <debug.h> -#include <_debug.h> -#include <msg.h> +#include <libintl.h> +#include <sys/varargs.h> +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <alist.h> +#include <debug.h> +#include <_debug.h> +#include <msg.h> /* * Define a debug descriptor. Note, although this provides the default diff --git a/usr/src/cmd/sgs/liblddbg/common/mapfile-vers b/usr/src/cmd/sgs/liblddbg/common/mapfile-vers index 573761a5f1..7c37d7ccac 100644 --- a/usr/src/cmd/sgs/liblddbg/common/mapfile-vers +++ b/usr/src/cmd/sgs/liblddbg/common/mapfile-vers @@ -526,10 +526,10 @@ SUNWprivate_3.23 { # we're capable of doing, rather than an admission that its really worth it :-). { - _dgettext = FUNCTION extern; _close = FUNCTION extern; _open = FUNCTION extern; _write = FUNCTION extern; + dgettext = FUNCTION extern; dlopen = FUNCTION extern; dlsym = FUNCTION extern; free = FUNCTION parent; diff --git a/usr/src/cmd/sgs/libldstab/common/stab.c b/usr/src/cmd/sgs/libldstab/common/stab.c index 20ed8b7f8f..1f8a00a289 100644 --- a/usr/src/cmd/sgs/libldstab/common/stab.c +++ b/usr/src/cmd/sgs/libldstab/common/stab.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,29 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* * This file contains all functions relating to stab processing. The * stab table is compressed by eliminating duplicate include file entries. */ -#include <stdio.h> -#include <string.h> -#include <stab.h> -#include <unistd.h> -#include <stdlib.h> -#include <signal.h> -#include <sys/param.h> -#include <errno.h> -#include "libld.h" -#include "msg.h" +#include <stdio.h> +#include <string.h> +#include <stab.h> +#include <unistd.h> +#include <stdlib.h> +#include <signal.h> +#include <sys/param.h> +#include <errno.h> +#include <libintl.h> +#include "libld.h" +#include "msg.h" /* @@ -176,14 +178,14 @@ static Xword pass1_stabindex(const Elf_Data *s_data, const Elf_Data *str_data, const size_t cwd_len, const size_t name_len) { - struct nlist *elem, - *last = NULL; - size_t i, - str_offset = 0, - new_size = 0, - first_object = 1, - any_obj = 0, - num_elem; + struct nlist *elem; + struct nlist *last = NULL; + size_t i; + size_t str_offset = 0; + size_t new_size = 0; + size_t first_object = 1; + size_t any_obj = 0; + size_t num_elem; /* * The processing of the stab table happens in two passes. * @@ -203,7 +205,7 @@ pass1_stabindex(const Elf_Data *s_data, const Elf_Data *str_data, break; case N_OBJ: str = (char *)str_data->d_buf + str_offset + - elem->n_strx; + elem->n_strx; if ((*str == '\0') && first_object) { /* @@ -241,12 +243,12 @@ static int pass2_stabindex(Elf_Data *s_data, Elf_Data *str_data, const char *name, size_t name_len, size_t cwd_pos, size_t free_pos) { - struct nlist *elem, - *last = NULL; - size_t i, - str_offset = 0, - first_object = 1, - num_elem; + struct nlist *elem; + struct nlist *last = NULL; + size_t i; + size_t str_offset = 0; + size_t first_object = 1; + size_t num_elem; /* * The processing of the stab table happens in two passes. * @@ -266,7 +268,7 @@ pass2_stabindex(Elf_Data *s_data, Elf_Data *str_data, const char *name, break; case N_OBJ: str = (char *)str_data->d_buf + str_offset + - elem->n_strx; + elem->n_strx; if ((*str == '\0') && first_object) { /* @@ -288,7 +290,7 @@ pass2_stabindex(Elf_Data *s_data, Elf_Data *str_data, const char *name, * to it. */ (void) strcpy((char *)str_data->d_buf + - free_pos, name); + free_pos, name); /*LINTED*/ elem->n_strx = (unsigned)(free_pos - str_offset); @@ -377,24 +379,24 @@ get_str_data(Elf *elf, const char *strtab, const char *name, Shdr *shdr) shdr->sh_flags, &str_scn); if (strscn_ndx == 0) { (void) fprintf(stderr, MSG_INTL(MSG_STAB_MISTBL), - in_fname); + in_fname); return ((Elf_Data *)S_ERROR); } else if (strscn_ndx == (size_t)-1) { (void) fprintf(stderr, MSG_INTL(MSG_STAB_BADTBL), - in_fname); + in_fname); return ((Elf_Data *)S_ERROR); } } else { if ((str_scn = elf_getscn(elf, shdr->sh_link)) == NULL) { (void) fprintf(stderr, MSG_INTL(MSG_ELF_GETSCN), - in_fname, elf_errmsg(0)); + in_fname, elf_errmsg(0)); return ((Elf_Data *)S_ERROR); } } if ((str_data = elf_getdata(str_scn, NULL)) == NULL) { (void) fprintf(stderr, MSG_INTL(MSG_ELF_GETDATA), in_fname, - elf_errmsg(0)); + elf_errmsg(0)); return ((Elf_Data *)S_ERROR); } @@ -420,9 +422,9 @@ process_stabindex(Elf *elf, const char *elf_strtab, const char *strtab_name, Elf_Data *str_data; static char *cwd = NULL; static size_t cwd_len; - size_t new_size, - cwd_pos, - name_len; + size_t new_size; + size_t cwd_pos; + size_t name_len; Elf_Void *data; if ((str_data = get_str_data(elf, elf_strtab, strtab_name, @@ -432,7 +434,7 @@ process_stabindex(Elf *elf, const char *elf_strtab, const char *strtab_name, if (cwd == NULL) { if ((cwd = getcwd(NULL, MAXPATHLEN)) == NULL) { (void) fprintf(stderr, MSG_INTL(MSG_SYS_GETCWD), - in_fname, strerror(errno)); + in_fname, strerror(errno)); return; } cwd_len = strlen(cwd); @@ -468,7 +470,7 @@ process_stabindex(Elf *elf, const char *elf_strtab, const char *strtab_name, str_data->d_size = str_data->d_size + new_size; (void) pass2_stabindex(s_data, str_data, in_fname, name_len, cwd_pos, - cwd_pos + cwd_len + 1); + cwd_pos + cwd_len + 1); } @@ -637,14 +639,12 @@ ld_atexit(int status) #if !defined(_ELF64) /* - * Messaging support - funnel everything through _dgettext() as this provides - * a stub binding to libc, or a real binding to libintl. + * Messaging support - funnel everything through dgettext(). */ -extern char *_dgettext(const char *, const char *); const char * _libldstab_msg(Msg mid) { - return (_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); + return (dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); } #endif diff --git a/usr/src/cmd/sgs/librtld/Makefile.com b/usr/src/cmd/sgs/librtld/Makefile.com index 08a4139b67..3da19ae66c 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.com +++ b/usr/src/cmd/sgs/librtld/Makefile.com @@ -70,7 +70,7 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n librtld_msg SRCS= ../common/llib-lrtld LINTSRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=../common/%.c) \ - $(BLTDATA) ../common/lintsup.c + $(BLTDATA) CLEANFILES += $(BLTFILES) $(LINTOUTS) CLOBBERFILES += $(DYNLIB) $(LINTLIB) $(LIBLINKS) diff --git a/usr/src/cmd/sgs/librtld/common/util.c b/usr/src/cmd/sgs/librtld/common/util.c index 1687a38d8a..7e51bb8f16 100644 --- a/usr/src/cmd/sgs/librtld/common/util.c +++ b/usr/src/cmd/sgs/librtld/common/util.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1998 by 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" -#include "msg.h" +#include <libintl.h> +#include "msg.h" /* - * Messaging support - funnel everything through _dgettext() as this provides - * a stub binding to libc, or a real binding to libintl. + * Messaging support - funnel everything through dgettext(). */ -extern char * _dgettext(const char *, const char *); const char * _librtld_msg(Msg mid) { - return (_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); + return (dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); } diff --git a/usr/src/cmd/sgs/rtld/amd64/_setup.c b/usr/src/cmd/sgs/rtld/amd64/_setup.c index 464e16f12b..01dcd29683 100644 --- a/usr/src/cmd/sgs/rtld/amd64/_setup.c +++ b/usr/src/cmd/sgs/rtld/amd64/_setup.c @@ -20,9 +20,10 @@ */ /* - * Copyright 2007 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" /* @@ -35,7 +36,6 @@ * If errors occur, send process signal - otherwise * return executable's entry point to the bootstrap routine. */ -#include "_synonyms.h" #include <signal.h> #include <stdlib.h> diff --git a/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c b/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c index 036fc356f6..8907b46706 100644 --- a/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c +++ b/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c @@ -23,13 +23,13 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* * amd64 machine dependent and ELF file class dependent functions. * Contains routines for performing function binding and symbol relocations. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/elf.h> diff --git a/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c b/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c index da06d0c45a..2f568cbcaf 100644 --- a/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c +++ b/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c @@ -30,7 +30,6 @@ * Block comment which describes the contents of this file. */ -#include <_synonyms.h> #include <string.h> #include <dlfcn.h> #include <debug.h> @@ -124,10 +123,10 @@ getunwind_core(Lm_list *lml, void *pc, Dl_amd64_unwindinfo *unwindinfo) return (unwindinfo); } -#pragma weak dlamd64getunwind = _dlamd64getunwind +#pragma weak _dlamd64getunwind = dlamd64getunwind Dl_amd64_unwindinfo * -_dlamd64getunwind(void *pc, Dl_amd64_unwindinfo *unwindinfo) +dlamd64getunwind(void *pc, Dl_amd64_unwindinfo *unwindinfo) { Rt_map *lmp; Lm_list *lml; diff --git a/usr/src/cmd/sgs/rtld/common/a.out.c b/usr/src/cmd/sgs/rtld/common/a.out.c index e91c0bdf3b..cfd76c331a 100644 --- a/usr/src/cmd/sgs/rtld/common/a.out.c +++ b/usr/src/cmd/sgs/rtld/common/a.out.c @@ -23,12 +23,12 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* * Object file dependent support for a.out format objects. */ -#include "_synonyms.h" #include <a.out.h> /* Explicitly override M_SEGSIZE */ #include <machdep.h> /* used in M_SROUND */ diff --git a/usr/src/cmd/sgs/rtld/common/analyze.c b/usr/src/cmd/sgs/rtld/common/analyze.c index d1109ac959..bc6669706d 100644 --- a/usr/src/cmd/sgs/rtld/common/analyze.c +++ b/usr/src/cmd/sgs/rtld/common/analyze.c @@ -20,15 +20,16 @@ */ /* - * Copyright (c) 1988 AT&T - * All Rights Reserved - * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#include "_synonyms.h" +/* + * Copyright (c) 1988 AT&T + * All Rights Reserved + */ + +#pragma ident "%Z%%M% %I% %E% SMI" #include <string.h> #include <stdio.h> diff --git a/usr/src/cmd/sgs/rtld/common/cache_a.out.c b/usr/src/cmd/sgs/rtld/common/cache_a.out.c index 4b7c1f37b1..f825c3b57d 100644 --- a/usr/src/cmd/sgs/rtld/common/cache_a.out.c +++ b/usr/src/cmd/sgs/rtld/common/cache_a.out.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2006 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" /* * 4.x ld.so directory caching: run-time link-editor specific functions. */ -#include "_synonyms.h" #include <dirent.h> #include <string.h> @@ -486,7 +486,7 @@ verscmp(const char *c1p, const char *c2p) /* represents */ while (((l_c1p_ok = stol(l_c1p, '.', &l_c1p, &c1p_dig)) == 1) && - stol(l_c2p, '.', &l_c2p, &c2p_dig) && (c2p_dig == c1p_dig)) { + stol(l_c2p, '.', &l_c2p, &c2p_dig) && (c2p_dig == c1p_dig)) { if (EMPTY(l_c1p) && EMPTY(l_c2p)) return (0); else if (EMPTY(l_c1p) && !EMPTY(l_c2p) && diff --git a/usr/src/cmd/sgs/rtld/common/cap.c b/usr/src/cmd/sgs/rtld/common/cap.c index 7c69c7d4fb..312220521f 100644 --- a/usr/src/cmd/sgs/rtld/common/cap.c +++ b/usr/src/cmd/sgs/rtld/common/cap.c @@ -23,9 +23,8 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" -#include "_synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" #include <sys/types.h> #include <sys/mman.h> diff --git a/usr/src/cmd/sgs/rtld/common/config_elf.c b/usr/src/cmd/sgs/rtld/common/config_elf.c index a1448052dc..dbb585155f 100644 --- a/usr/src/cmd/sgs/rtld/common/config_elf.c +++ b/usr/src/cmd/sgs/rtld/common/config_elf.c @@ -20,12 +20,11 @@ */ /* - * Copyright 2006 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" -#include "_synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" #include <sys/mman.h> #include <sys/types.h> diff --git a/usr/src/cmd/sgs/rtld/common/debug.c b/usr/src/cmd/sgs/rtld/common/debug.c index ffbaf0ff32..a58e294246 100644 --- a/usr/src/cmd/sgs/rtld/common/debug.c +++ b/usr/src/cmd/sgs/rtld/common/debug.c @@ -26,8 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "_synonyms.h" - #include <sys/types.h> #include <sys/stat.h> #include <sys/param.h> diff --git a/usr/src/cmd/sgs/rtld/common/dlfcns.c b/usr/src/cmd/sgs/rtld/common/dlfcns.c index 80b925dc53..6b2ceb8ff8 100644 --- a/usr/src/cmd/sgs/rtld/common/dlfcns.c +++ b/usr/src/cmd/sgs/rtld/common/dlfcns.c @@ -20,19 +20,20 @@ */ /* - * Copyright (c) 1988 AT&T - * 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" /* * Programmatic interface to the run_time linker. */ -#include "_synonyms.h" #include <sys/debug.h> #include <stdio.h> @@ -100,14 +101,14 @@ _caller(caddr_t cpc, int flags) return (0); } -#pragma weak dlerror = _dlerror +#pragma weak _dlerror = dlerror /* * External entry for dlerror(3dl). Returns a pointer to the string describing * the last occurring error. The last occurring error is cleared. */ char * -_dlerror() +dlerror() { char *error; Rt_map *clmp; @@ -522,13 +523,13 @@ dlclose_check(void *handle, Rt_map *clmp) return (dlclose_intn(ghp, clmp)); } -#pragma weak dlclose = _dlclose +#pragma weak _dlclose = dlclose /* * External entry for dlclose(3dl). Returns 0 for success, non-zero otherwise. */ int -_dlclose(void *handle) +dlclose(void *handle) { int error, entry; Rt_map *clmp; @@ -930,7 +931,7 @@ dlmopen_check(Lm_list *lml, const char *path, int mode, Rt_map *clmp) return (dlmopen_intn(lml, path, mode, clmp, 0, 0)); } -#pragma weak dlopen = _dlopen +#pragma weak _dlopen = dlopen /* * External entry for dlopen(3dl). On success, returns a pointer (handle) to @@ -938,7 +939,7 @@ dlmopen_check(Lm_list *lml, const char *path, int mode, Rt_map *clmp) * be used by dlsym(). On failure, returns a null pointer. */ void * -_dlopen(const char *path, int mode) +dlopen(const char *path, int mode) { int entry; Rt_map *clmp; @@ -957,13 +958,13 @@ _dlopen(const char *path, int mode) return ((void *)ghp); } +#pragma weak _dlmopen = dlmopen + /* * External entry for dlmopen(3dl). */ -#pragma weak dlmopen = _dlmopen - void * -_dlmopen(Lmid_t lmid, const char *path, int mode) +dlmopen(Lmid_t lmid, const char *path, int mode) { int entry; Rt_map *clmp; @@ -1426,14 +1427,14 @@ dlsym_check(void *handle, const char *name, Rt_map *clmp, Rt_map **dlmp) } -#pragma weak dlsym = _dlsym +#pragma weak _dlsym = dlsym /* * External entry for dlsym(). On success, returns the address of the specified * symbol. On error returns a null. */ void * -_dlsym(void *handle, const char *name) +dlsym(void *handle, const char *name) { int entry; Rt_map *clmp, *dlmp = 0; @@ -1477,14 +1478,14 @@ dladdr_core(Rt_map *clmp, void *addr, Dl_info *dlip, void **info, int flags) LM_DLADDR(clmp)((ulong_t)addr, clmp, dlip, info, flags); } -#pragma weak dladdr = _dladdr +#pragma weak _dladdr = dladdr /* * External entry for dladdr(3dl) and dladdr1(3dl). Returns an information * structure that reflects the symbol closest to the address specified. */ int -_dladdr(void *addr, Dl_info *dlip) +dladdr(void *addr, Dl_info *dlip) { int entry, error; Rt_map *clmp; @@ -1510,10 +1511,10 @@ _dladdr(void *addr, Dl_info *dlip) return (error); } -#pragma weak dladdr1 = _dladdr1 +#pragma weak _dladdr1 = dladdr1 int -_dladdr1(void *addr, Dl_info *dlip, void **info, int flags) +dladdr1(void *addr, Dl_info *dlip, void **info, int flags) { int entry, error = 0; Rt_map *clmp; @@ -1622,13 +1623,13 @@ dldump_core(Lm_list *lml, const char *ipath, const char *opath, int flags) return (rt_dldump(lmp, opath, flags, addr)); } -#pragma weak dldump = _dldump +#pragma weak _dldump = dldump /* * External entry for dldump(3c). Returns 0 on success, non-zero otherwise. */ int -_dldump(const char *ipath, const char *opath, int flags) +dldump(const char *ipath, const char *opath, int flags) { int error, entry; Rt_map *clmp; @@ -1896,13 +1897,13 @@ dlinfo_core(void *handle, int request, void *p, Rt_map *clmp) return (0); } -#pragma weak dlinfo = _dlinfo +#pragma weak _dlinfo = dlinfo /* * External entry for dlinfo(3dl). */ int -_dlinfo(void *handle, int request, void *p) +dlinfo(void *handle, int request, void *p) { int error, entry; Rt_map *clmp; diff --git a/usr/src/cmd/sgs/rtld/common/elf.c b/usr/src/cmd/sgs/rtld/common/elf.c index 1ff5f5c9f2..5cae84bdeb 100644 --- a/usr/src/cmd/sgs/rtld/common/elf.c +++ b/usr/src/cmd/sgs/rtld/common/elf.c @@ -20,18 +20,20 @@ */ /* - * Copyright (c) 1988 AT&T - * 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" /* * Object file dependent support for ELF objects. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/procfs.h> diff --git a/usr/src/cmd/sgs/rtld/common/external.c b/usr/src/cmd/sgs/rtld/common/external.c index 4b83bf0591..b129308fba 100644 --- a/usr/src/cmd/sgs/rtld/common/external.c +++ b/usr/src/cmd/sgs/rtld/common/external.c @@ -165,7 +165,6 @@ * CI_* via RTLDINFO and _ld_libc() - new libthread */ -#include "_synonyms.h" #include <sys/debug.h> #include <synch.h> #include <signal.h> @@ -502,44 +501,32 @@ rt_cond_broadcast(Rt_cond * cvp) * libc_pic.a. Note, as ld.so.1 is essentially single threaded these can be * noops. */ -#pragma weak lmutex_lock = __mutex_lock -#pragma weak _private_mutex_lock = __mutex_lock -#pragma weak mutex_lock = __mutex_lock -#pragma weak _mutex_lock = __mutex_lock +#pragma weak lmutex_lock = mutex_lock /* ARGSUSED */ int -__mutex_lock(mutex_t *mp) +mutex_lock(mutex_t *mp) { return (0); } -#pragma weak lmutex_unlock = __mutex_unlock -#pragma weak _private_mutex_unlock = __mutex_unlock -#pragma weak mutex_unlock = __mutex_unlock -#pragma weak _mutex_unlock = __mutex_unlock +#pragma weak lmutex_unlock = mutex_unlock /* ARGSUSED */ int -__mutex_unlock(mutex_t *mp) +mutex_unlock(mutex_t *mp) { return (0); } -#pragma weak _private_mutex_init = __mutex_init -#pragma weak mutex_init = __mutex_init -#pragma weak _mutex_init = __mutex_init /* ARGSUSED */ int -__mutex_init(mutex_t *mp, int type, void *arg) +mutex_init(mutex_t *mp, int type, void *arg) { return (0); } -#pragma weak _private_mutex_destroy = __mutex_destroy -#pragma weak mutex_destroy = __mutex_destroy -#pragma weak _mutex_destroy = __mutex_destroy /* ARGSUSED */ int -__mutex_destroy(mutex_t *mp) +mutex_destroy(mutex_t *mp) { return (0); } @@ -547,9 +534,8 @@ __mutex_destroy(mutex_t *mp) /* * This is needed to satisfy sysconf() (case _SC_THREAD_STACK_MIN) */ -#pragma weak thr_min_stack = _thr_min_stack size_t -_thr_min_stack() +thr_min_stack() { #ifdef _LP64 return (8 * 1024); @@ -566,18 +552,16 @@ _thr_min_stack() * non-cancellation interfaces. */ -#pragma weak close = _close int -_close(int fildes) +close(int fildes) { extern int __close(int); return (__close(fildes)); } -#pragma weak fcntl = _fcntl int -_fcntl(int fildes, int cmd, ...) +fcntl(int fildes, int cmd, ...) { extern int __fcntl(int, int, ...); intptr_t arg; @@ -589,9 +573,8 @@ _fcntl(int fildes, int cmd, ...) return (__fcntl(fildes, cmd, arg)); } -#pragma weak open = _open int -_open(const char *path, int oflag, ...) +open(const char *path, int oflag, ...) { extern int __open(const char *, int, ...); mode_t mode; @@ -603,9 +586,8 @@ _open(const char *path, int oflag, ...) return (__open(path, oflag, mode)); } -#pragma weak openat = _openat int -_openat(int fd, const char *path, int oflag, ...) +openat(int fd, const char *path, int oflag, ...) { extern int __openat(int, const char *, int, ...); mode_t mode; @@ -617,17 +599,15 @@ _openat(int fd, const char *path, int oflag, ...) return (__openat(fd, path, oflag, mode)); } -#pragma weak read = _read ssize_t -_read(int fd, void *buf, size_t size) +read(int fd, void *buf, size_t size) { extern ssize_t __read(int, void *, size_t); return (__read(fd, buf, size)); } -#pragma weak write = _write ssize_t -_write(int fd, const void *buf, size_t size) +write(int fd, const void *buf, size_t size) { extern ssize_t __write(int, const void *, size_t); return (__write(fd, buf, size)); diff --git a/usr/src/cmd/sgs/rtld/common/getcwd.c b/usr/src/cmd/sgs/rtld/common/getcwd.c index 375a433350..3f8109fb91 100644 --- a/usr/src/cmd/sgs/rtld/common/getcwd.c +++ b/usr/src/cmd/sgs/rtld/common/getcwd.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,14 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "_synonyms.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/usr/src/cmd/sgs/rtld/common/locale.c b/usr/src/cmd/sgs/rtld/common/locale.c index aef17d0c41..91b4448d44 100644 --- a/usr/src/cmd/sgs/rtld/common/locale.c +++ b/usr/src/cmd/sgs/rtld/common/locale.c @@ -20,9 +20,10 @@ */ /* - * Copyright 2006 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" /* @@ -37,19 +38,19 @@ * routines from libc/libintl isn't possible as they cause all i18n support to * be included which is far too expensive for ld.so.1. */ -#include "_synonyms.h" - -#include <sys/types.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <fcntl.h> -#include <limits.h> -#include "_rtld.h" -#include "msg.h" + +#include <sys/types.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <fcntl.h> +#include <limits.h> +#include <libintl.h> +#include "_rtld.h" +#include "msg.h" /* * A message object file (as generated by msgfmt(1)) consists of a message @@ -153,7 +154,7 @@ open_mofile(Domain * dom) dom->dom_msghdr = (Msghdr *)-1; (void) snprintf(path, PATH_MAX, MSG_ORIG(MSG_FMT_MSGFILE), - glcs[CI_LCMESSAGES].lc_un.lc_ptr, domain); + glcs[CI_LCMESSAGES].lc_un.lc_ptr, domain); if ((fd = open(path, O_RDONLY, 0)) == -1) return; @@ -207,15 +208,15 @@ open_mofile(Domain * dom) /* * Two interfaces are established to support our internationalization. * gettext(3i) calls originate from all link-editor libraries, and thus the - * SUNW_OST_SGS domain is assumed. _dgettext() calls originate from + * SUNW_OST_SGS domain is assumed. dgettext() calls originate from * dependencies such as libelf and libc. * * Presently we support two domains (libc's strerror() uses SUNW_OST_OSLIB). * If ld.so.1's dependencies evolve to require more then the `domain' array * maintained below can be enlarged or made more dynamic in nature. */ -const char * -_dgettext(const char *domain, const char *msgid) +char * +dgettext(const char *domain, const char *msgid) { static int domaincnt = 0; static Domain *domains; @@ -223,14 +224,14 @@ _dgettext(const char *domain, const char *msgid) int cnt; if (glcs[CI_LCMESSAGES].lc_un.lc_val == 0) - return (msgid); + return ((char *)msgid); /* * Determine if we've initialized any domains yet. */ if (domaincnt == 0) { if ((domains = (Domain *)calloc(sizeof (Domain), 2)) == 0) - return (msgid); + return ((char *)msgid); domains[0].dom_name = MSG_ORIG(MSG_SUNW_OST_SGS); domains[1].dom_name = MSG_ORIG(MSG_SUNW_OST_OSLIB); domaincnt = 2; @@ -265,7 +266,7 @@ _dgettext(const char *domain, const char *msgid) break; } if (cnt == domaincnt) - return (msgid); + return ((char *)msgid); /* * Determine if the domain has been initialized yet. @@ -273,9 +274,9 @@ _dgettext(const char *domain, const char *msgid) if (_domain->dom_msghdr == 0) open_mofile(_domain); if (_domain->dom_msghdr == (Msghdr *)-1) - return (msgid); + return ((char *)msgid); - return (msgid_to_msgstr(_domain->dom_msghdr, msgid)); + return ((char *)msgid_to_msgstr(_domain->dom_msghdr, msgid)); } /* @@ -286,7 +287,7 @@ _dgettext(const char *domain, const char *msgid) char * gettext(const char *msgid) { - return ((char *)_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), msgid)); + return ((char *)dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), msgid)); } /* @@ -295,5 +296,5 @@ gettext(const char *msgid) const char * _rtld_msg(Msg mid) { - return ((char *)_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); + return ((char *)dgettext(MSG_ORIG(MSG_SUNW_OST_SGS), MSG_ORIG(mid))); } diff --git a/usr/src/cmd/sgs/rtld/common/malloc.c b/usr/src/cmd/sgs/rtld/common/malloc.c index 5638ff9112..8669be4897 100644 --- a/usr/src/cmd/sgs/rtld/common/malloc.c +++ b/usr/src/cmd/sgs/rtld/common/malloc.c @@ -20,12 +20,15 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 1988 AT&T * All Rights Reserved - * - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* @@ -38,7 +41,6 @@ * New memory chunks are allocated on a first-fit basis. * Freed blocks are joined in larger blocks. Free pages are unmapped. */ -#include "_synonyms.h" #include <stdlib.h> #include <sys/types.h> diff --git a/usr/src/cmd/sgs/rtld/common/mapfile-vers b/usr/src/cmd/sgs/rtld/common/mapfile-vers index 566b9b2a8b..3aeb6904cb 100644 --- a/usr/src/cmd/sgs/rtld/common/mapfile-vers +++ b/usr/src/cmd/sgs/rtld/common/mapfile-vers @@ -41,25 +41,26 @@ SUNWprivate_1.2 { protected: - _dladdr; # Standard dlopen(3x) family - dladdr; - _dladdr1; + dladdr; # Standard dlopen(3x) family dladdr1; - _dldump; dldump; - _dlclose; dlclose; - _dlerror; dlerror; - _dlinfo; dlinfo; - _dlopen; dlopen; - _dlmopen; dlmopen; - _dlsym; dlsym; + _dladdr; # these should not exist + _dladdr1; + _dldump; + _dlclose; + _dlerror; + _dlinfo; + _dlopen; + _dlmopen; + _dlsym; + _ld_libc; # provides libc initialization _elf_rtbndr; # dbx expects to find these @@ -82,7 +83,7 @@ SUNWprivate_1.2 { dbg_print; eprintf; # Error message printing - _dgettext; # Messaging support + dgettext; # Messaging support strerror; calloc; # Memory management (mapmalloc). diff --git a/usr/src/cmd/sgs/rtld/common/move.c b/usr/src/cmd/sgs/rtld/common/move.c index 3f558300de..766b69c5ac 100644 --- a/usr/src/cmd/sgs/rtld/common/move.c +++ b/usr/src/cmd/sgs/rtld/common/move.c @@ -23,12 +23,12 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* * Object file dependent support for ELF objects. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/procfs.h> diff --git a/usr/src/cmd/sgs/rtld/common/object.c b/usr/src/cmd/sgs/rtld/common/object.c index 89217f52ba..163ef2de97 100644 --- a/usr/src/cmd/sgs/rtld/common/object.c +++ b/usr/src/cmd/sgs/rtld/common/object.c @@ -23,12 +23,12 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* * Object file dependent suport for ELF objects. */ -#include "_synonyms.h" #include <sys/mman.h> #include <stdio.h> diff --git a/usr/src/cmd/sgs/rtld/common/paths.c b/usr/src/cmd/sgs/rtld/common/paths.c index 91a3a6e6dd..da750728d4 100644 --- a/usr/src/cmd/sgs/rtld/common/paths.c +++ b/usr/src/cmd/sgs/rtld/common/paths.c @@ -20,18 +20,20 @@ */ /* - * Copyright (c) 1988 AT&T - * 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" /* * PATH setup and search directory functions. */ -#include "_synonyms.h" #include <stdio.h> #include <limits.h> @@ -234,10 +236,12 @@ get_dir_list(uchar_t rules, Rt_map *lmp, uint_t flags) /* BEGIN CSTYLED */ if (search) { if (dirlist->p_orig & LA_SER_CONFIG) - (void) printf(MSG_INTL(MSG_LDD_PTH_ENDDFLC), - config->c_name); + (void) printf( + MSG_INTL(MSG_LDD_PTH_ENDDFLC), + config->c_name); else - (void) printf(MSG_INTL(MSG_LDD_PTH_ENDDFL)); + (void) printf( + MSG_INTL(MSG_LDD_PTH_ENDDFL)); } /* END CSTYLED */ } @@ -806,15 +810,17 @@ is_path_secure(char *opath, Rt_map *clmp, uint_t info, uint_t flags) if (lml->lm_flags & LML_FLG_TRC_ENABLE) { /* BEGIN CSTYLED */ if ((FLAGS1(clmp) & FL1_RT_LDDSTUB) == 0) { - if (lml->lm_flags & - (LML_FLG_TRC_VERBOSE | LML_FLG_TRC_SEARCH)) - (void) printf(MSG_INTL(MSG_LDD_FIL_FIND), - opath, NAME(clmp)); - - if (((rtld_flags & RT_FL_SILENCERR) == 0) || - (lml->lm_flags & LML_FLG_TRC_VERBOSE)) - (void) printf(MSG_INTL(MSG_LDD_FIL_ILLEGAL), - opath); + if (lml->lm_flags & + (LML_FLG_TRC_VERBOSE | LML_FLG_TRC_SEARCH)) + (void) printf( + MSG_INTL(MSG_LDD_FIL_FIND), + opath, NAME(clmp)); + + if (((rtld_flags & RT_FL_SILENCERR) == 0) || + (lml->lm_flags & LML_FLG_TRC_VERBOSE)) + (void) printf( + MSG_INTL(MSG_LDD_FIL_ILLEGAL), + opath); } /* END CSTYLED */ } else diff --git a/usr/src/cmd/sgs/rtld/common/remove.c b/usr/src/cmd/sgs/rtld/common/remove.c index 45c03797b6..32d7d22125 100644 --- a/usr/src/cmd/sgs/rtld/common/remove.c +++ b/usr/src/cmd/sgs/rtld/common/remove.c @@ -17,11 +17,14 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END - * - * + */ + +/* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Remove objects. Objects need removal from a process as part of: * * o a dlclose() request @@ -48,8 +51,6 @@ */ #pragma ident "%Z%%M% %I% %E% SMI" -#include "_synonyms.h" - #include <string.h> #include <stdio.h> #include <unistd.h> diff --git a/usr/src/cmd/sgs/rtld/common/setup.c b/usr/src/cmd/sgs/rtld/common/setup.c index f97847e6fe..ee8b97eb4d 100644 --- a/usr/src/cmd/sgs/rtld/common/setup.c +++ b/usr/src/cmd/sgs/rtld/common/setup.c @@ -20,21 +20,22 @@ */ /* - * Copyright (c) 1988 AT&T - * All Rights Reserved - * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 1988 AT&T + * All Rights Reserved + */ + +#pragma ident "%Z%%M% %I% %E% SMI" /* * Run time linker common setup. * * Called from _setup to get the process going at startup. */ -#include "_synonyms.h" #include <stdlib.h> #include <fcntl.h> diff --git a/usr/src/cmd/sgs/rtld/common/tsort.c b/usr/src/cmd/sgs/rtld/common/tsort.c index 1e48b15652..7afa6c78d9 100644 --- a/usr/src/cmd/sgs/rtld/common/tsort.c +++ b/usr/src/cmd/sgs/rtld/common/tsort.c @@ -23,6 +23,7 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* @@ -37,7 +38,6 @@ * Chapter 29 Elementary Graph Algorithms * Chapter 32 Directed Graph */ -#include "_synonyms.h" #include <sys/types.h> #include <stdarg.h> diff --git a/usr/src/cmd/sgs/rtld/common/util.c b/usr/src/cmd/sgs/rtld/common/util.c index 72210d22de..c7671087d7 100644 --- a/usr/src/cmd/sgs/rtld/common/util.c +++ b/usr/src/cmd/sgs/rtld/common/util.c @@ -20,19 +20,21 @@ */ /* - * Copyright (c) 1988 AT&T - * 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" /* * Utility routines for run-time linker. some are duplicated here from libc * (with different names) to avoid name space collisions. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/types.h> #include <sys/mman.h> @@ -3635,7 +3637,6 @@ security(uid_t uid, uid_t euid, gid_t gid, gid_t egid, int auxflags) * is basically singled threaded. Provide the interface for our dependencies. */ #undef errno -#pragma weak _private___errno = ___errno int * ___errno() { diff --git a/usr/src/cmd/sgs/rtld/i386/_setup.c b/usr/src/cmd/sgs/rtld/i386/_setup.c index 814863c678..8751960feb 100644 --- a/usr/src/cmd/sgs/rtld/i386/_setup.c +++ b/usr/src/cmd/sgs/rtld/i386/_setup.c @@ -20,11 +20,13 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 1988 AT&T * All Rights Reserved - * - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -39,7 +41,6 @@ * If errors occur, send process signal - otherwise * return executable's entry point to the bootstrap routine. */ -#include "_synonyms.h" #include <signal.h> #include <stdlib.h> diff --git a/usr/src/cmd/sgs/rtld/i386/i386_elf.c b/usr/src/cmd/sgs/rtld/i386/i386_elf.c index 3e9d58c00b..5d049f4245 100644 --- a/usr/src/cmd/sgs/rtld/i386/i386_elf.c +++ b/usr/src/cmd/sgs/rtld/i386/i386_elf.c @@ -20,19 +20,21 @@ */ /* - * Copyright (c) 1988 AT&T - * 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" /* * x86 machine dependent and ELF file class dependent functions. * Contains routines for performing function binding and symbol relocations. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/elf.h> diff --git a/usr/src/cmd/sgs/rtld/sparc/_setup.c b/usr/src/cmd/sgs/rtld/sparc/_setup.c index 5ab033af15..69a96fa211 100644 --- a/usr/src/cmd/sgs/rtld/sparc/_setup.c +++ b/usr/src/cmd/sgs/rtld/sparc/_setup.c @@ -20,12 +20,15 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 1988 AT&T * All Rights Reserved - * - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* @@ -38,7 +41,6 @@ * If errors occur, send process signal - otherwise * return executable's entry point to the bootstrap routine. */ -#include "_synonyms.h" #include <signal.h> #include <stdlib.h> @@ -252,6 +254,7 @@ _setup(Boot * ebp, Dyn * ld_dyn) #ifdef A_OUT aoutdyn, auxflags, hwcap_1)) == (Rt_map *)0) { #else + /* CSTYLED */ NULL, auxflags, hwcap_1)) == NULL) { #endif /* A_OUT */ rtldexit(&lml_main, 1); diff --git a/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c b/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c index e9e1734f35..0a6b0ef173 100644 --- a/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c +++ b/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c @@ -20,20 +20,21 @@ */ /* - * Copyright (c) 1988 AT&T - * 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" /* * SPARC machine dependent and a.out format file class dependent functions. * Contains routines for performing function binding and symbol relocations. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/types.h> diff --git a/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c b/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c index fb846dd55b..189da97b75 100644 --- a/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c +++ b/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c @@ -20,19 +20,21 @@ */ /* - * Copyright (c) 1988 AT&T - * 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" /* * SPARC machine dependent and ELF file class dependent functions. * Contains routines for performing function binding and symbol relocations. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/elf.h> diff --git a/usr/src/cmd/sgs/rtld/sparcv9/_setup.c b/usr/src/cmd/sgs/rtld/sparcv9/_setup.c index c032795d7d..2971b1bf88 100644 --- a/usr/src/cmd/sgs/rtld/sparcv9/_setup.c +++ b/usr/src/cmd/sgs/rtld/sparcv9/_setup.c @@ -20,12 +20,15 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 1988 AT&T * All Rights Reserved - * - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* @@ -38,7 +41,6 @@ * If errors occur, send process signal - otherwise * return executable's entry point to the bootstrap routine. */ -#include "_synonyms.h" #include <signal.h> #include <stdlib.h> diff --git a/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c b/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c index 03621e18ac..9d86421789 100644 --- a/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c +++ b/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c @@ -23,13 +23,13 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + #pragma ident "%Z%%M% %I% %E% SMI" /* * SPARC V9 machine dependent and ELF file class dependent functions. * Contains routines for performing function binding and symbol relocations. */ -#include "_synonyms.h" #include <stdio.h> #include <sys/elf.h> diff --git a/usr/src/cmd/ypcmd/makedbm.c b/usr/src/cmd/ypcmd/makedbm.c index 800105fd3c..6ed7b0a32d 100644 --- a/usr/src/cmd/ypcmd/makedbm.c +++ b/usr/src/cmd/ypcmd/makedbm.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -18,8 +17,10 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END - * - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -77,19 +78,20 @@ ino_t inode; dev_t dev; /* - * Interpose _close(2) to enable us to keep one of the output + * Interpose close(2) to enable us to keep one of the output * files open until process exit. */ +#pragma weak _close = close int -_close(int filedes) { +close(int filedes) { struct stat sb; static int (*fptr)() = 0; if (fptr == 0) { - fptr = (int (*)())dlsym(RTLD_NEXT, "_close"); + fptr = (int (*)())dlsym(RTLD_NEXT, "close"); if (fptr == 0) { - fprintf(stderr, "makedbm: dlopen(_close): %s\n", + fprintf(stderr, "makedbm: dlopen(close): %s\n", dlerror()); errno = ELIBACC; return (-1); diff --git a/usr/src/common/atomic/amd64/atomic.s b/usr/src/common/atomic/amd64/atomic.s index 6ac25e5eb1..6900a252b7 100644 --- a/usr/src/common/atomic/amd64/atomic.s +++ b/usr/src/common/atomic/amd64/atomic.s @@ -18,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -40,11 +41,6 @@ ANSI_PRAGMA_WEAK2(casptr,atomic_cas_ptr,function) ANSI_PRAGMA_WEAK2(atomic_and_long,atomic_and_ulong,function) ANSI_PRAGMA_WEAK2(atomic_or_long,atomic_or_ulong,function) -#else - /* - * Include the definitions for the libc weak aliases. - */ -#include "../atomic_asm_weak.h" #endif ENTRY(atomic_inc_8) diff --git a/usr/src/common/atomic/i386/atomic.s b/usr/src/common/atomic/i386/atomic.s index bedc3af4b7..2cf40baa48 100644 --- a/usr/src/common/atomic/i386/atomic.s +++ b/usr/src/common/atomic/i386/atomic.s @@ -18,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -40,11 +41,6 @@ ANSI_PRAGMA_WEAK2(casptr,atomic_cas_ptr,function) ANSI_PRAGMA_WEAK2(atomic_and_long,atomic_and_ulong,function) ANSI_PRAGMA_WEAK2(atomic_or_long,atomic_or_ulong,function) -#else - /* - * Include the definitions for the libc weak aliases. - */ -#include "../atomic_asm_weak.h" #endif ENTRY(atomic_inc_8) diff --git a/usr/src/common/atomic/sparc/atomic.s b/usr/src/common/atomic/sparc/atomic.s index 91545877ab..8a1735d350 100644 --- a/usr/src/common/atomic/sparc/atomic.s +++ b/usr/src/common/atomic/sparc/atomic.s @@ -18,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -41,11 +42,6 @@ ANSI_PRAGMA_WEAK2(atomic_and_long,atomic_and_ulong,function) ANSI_PRAGMA_WEAK2(atomic_or_long,atomic_or_ulong,function) ANSI_PRAGMA_WEAK2(swapl,atomic_swap_32,function) -#else - /* - * Include the definitions for the libc weak aliases. - */ -#include "../atomic_asm_weak.h" #endif /* diff --git a/usr/src/common/atomic/sparcv9/atomic.s b/usr/src/common/atomic/sparcv9/atomic.s index 5ea6f959cd..162898edaf 100644 --- a/usr/src/common/atomic/sparcv9/atomic.s +++ b/usr/src/common/atomic/sparcv9/atomic.s @@ -18,12 +18,13 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -108,10 +109,6 @@ label/**/1: #endif /* ATOMIC_BO_ENABLE_SHIFT */ #else /* _KERNEL */ - /* - * Include the definitions for the libc weak aliases. - */ -#include "../atomic_asm_weak.h" /* * ATOMIC_BO_ENABLE_SHIFT may be enabled/defined here for generic diff --git a/usr/src/common/util/bcmp.c b/usr/src/common/util/bcmp.c index 48aeddb7c0..4a834fc5aa 100644 --- a/usr/src/common/util/bcmp.c +++ b/usr/src/common/util/bcmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -34,7 +36,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #ifndef _KMDB -#include "synonyms.h" +#include "lint.h" #endif /* !_KMDB */ #include <sys/types.h> diff --git a/usr/src/common/util/bcopy.c b/usr/src/common/util/bcopy.c index 8a689f62a6..31ad85770b 100644 --- a/usr/src/common/util/bcopy.c +++ b/usr/src/common/util/bcopy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -34,7 +36,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #if !defined(_KMDB) && !defined(_BOOT) -#include "synonyms.h" +#include "lint.h" #endif /* !_KMDB && !_BOOT */ #include <sys/types.h> diff --git a/usr/src/common/util/bsearch.c b/usr/src/common/util/bsearch.c index ebbc5eb63e..ac16aaec2b 100644 --- a/usr/src/common/util/bsearch.c +++ b/usr/src/common/util/bsearch.c @@ -18,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2007 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" /* @@ -34,7 +34,7 @@ */ #if !defined(_BOOT) && !defined(_KMDB) -#include "synonyms.h" +#include "lint.h" #endif /* !_BOOT && !_KMDB */ #include <stddef.h> #include <stdlib.h> diff --git a/usr/src/common/util/bzero.c b/usr/src/common/util/bzero.c index 3bd96aa029..30e3f8b6c0 100644 --- a/usr/src/common/util/bzero.c +++ b/usr/src/common/util/bzero.c @@ -18,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -33,7 +36,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #if !defined(_KMDB) && !defined(_BOOT) -#include "synonyms.h" +#include "lint.h" #endif /* !_KMDB && !_BOOT */ #include <sys/types.h> diff --git a/usr/src/common/util/ffs.c b/usr/src/common/util/ffs.c index b37c661b82..ffe490d94c 100644 --- a/usr/src/common/util/ffs.c +++ b/usr/src/common/util/ffs.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -36,9 +36,8 @@ #include <sys/int_types.h> #define arg_t uintmax_t #else -#pragma weak ffs = _ffs #define arg_t int -#include "synonyms.h" +#include "lint.h" #endif int diff --git a/usr/src/common/util/memccpy.c b/usr/src/common/util/memccpy.c index 6278a0ab7b..7b3a059d23 100644 --- a/usr/src/common/util/memccpy.c +++ b/usr/src/common/util/memccpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #ifndef _KMDB -#pragma weak memccpy = _memccpy +#pragma weak _memccpy = memccpy -#include "synonyms.h" +#include "lint.h" #endif /* !_KMDB */ #include <sys/types.h> #include <string.h> diff --git a/usr/src/common/util/memcmp.c b/usr/src/common/util/memcmp.c index ccf933e7fa..eba006c877 100644 --- a/usr/src/common/util/memcmp.c +++ b/usr/src/common/util/memcmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #if !defined(_KMDB) && !defined(_BOOT) && !defined(_KERNEL) -#pragma weak memcmp = _memcmp +#pragma weak _memcmp = memcmp -#include "synonyms.h" +#include "lint.h" #endif /* !_KMDB && !_BOOT && !_KERNEL */ #include <sys/types.h> diff --git a/usr/src/common/util/memcpy.c b/usr/src/common/util/memcpy.c index 3193287604..0f239e5869 100644 --- a/usr/src/common/util/memcpy.c +++ b/usr/src/common/util/memcpy.c @@ -24,11 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * The SunStudio compiler may generate calls to _memcpy and so we * need to make sure that the correct symbol exists for these calls, @@ -37,16 +37,12 @@ #if !defined(_KMDB) && !defined(_BOOT) && !defined(_KERNEL) -#pragma weak memcpy = _memcpy +#include "lint.h" -#include "synonyms.h" - -#else +#endif /* !_KMDB && !_BOOT && !_KERNEL */ #pragma weak _memcpy = memcpy -#endif /* !_KMDB && !_BOOT && !_KERNEL */ - #include <sys/types.h> #if defined(_KERNEL) diff --git a/usr/src/common/util/memmove.c b/usr/src/common/util/memmove.c index 230d649378..7e7abb9e08 100644 --- a/usr/src/common/util/memmove.c +++ b/usr/src/common/util/memmove.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #if !defined(_KMDB) && !defined(_KERNEL) -#pragma weak memmove = _memmove +#pragma weak _memmove = memmove -#include "synonyms.h" +#include "lint.h" #endif /* !_KMDB && !_KERNEL */ #include <sys/types.h> diff --git a/usr/src/common/util/memset.c b/usr/src/common/util/memset.c index 69f6eb3967..9236d49f3b 100644 --- a/usr/src/common/util/memset.c +++ b/usr/src/common/util/memset.c @@ -24,17 +24,16 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #if !defined(_KMDB) && !defined(_BOOT) && !defined(_KERNEL) -#pragma weak memset = _memset +#pragma weak _memset = memset -#include "synonyms.h" +#include "lint.h" #endif /* !_KMDB && !_BOOT && !_KERNEL */ #include <sys/types.h> diff --git a/usr/src/common/util/qsort.c b/usr/src/common/util/qsort.c index 203c0c16d3..ce2a596554 100644 --- a/usr/src/common/util/qsort.c +++ b/usr/src/common/util/qsort.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,15 +20,14 @@ */ /* - * Copyright 2006 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" - #if !defined(_KERNEL) && !defined(_KMDB) -#include "synonyms.h" +#include "lint.h" #endif /* !_KERNEL && !_KMDB */ #include <sys/types.h> diff --git a/usr/src/common/util/strtol.c b/usr/src/common/util/strtol.c index 440d7f2f26..26614146e9 100644 --- a/usr/src/common/util/strtol.c +++ b/usr/src/common/util/strtol.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,19 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2005 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" /* SVr4.0 2.15 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" #if !defined(_BOOT) && !defined(_KMDB) -#include "synonyms.h" +#include "lint.h" #endif /* !_BOOT && !_KMDB */ #include <errno.h> #include <ctype.h> @@ -95,7 +94,7 @@ strtol(const char *str, char **nptr, int base) if (!lisalnum(c) || (xx = DIGIT(c)) >= base) return (0); /* no number formed */ if (base == 16 && c == '0' && (ustr[1] == 'x' || ustr[1] == 'X') && - isxdigit(ustr[2])) + isxdigit(ustr[2])) c = *(ustr += 2); /* skip over leading "0x" or "0X" */ /* this code assumes that abs(LONG_MIN) >= abs(LONG_MAX) */ diff --git a/usr/src/common/util/strtoul.c b/usr/src/common/util/strtoul.c index 214b3b79a6..9d01f2eebf 100644 --- a/usr/src/common/util/strtoul.c +++ b/usr/src/common/util/strtoul.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,19 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2005 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" /* SVr4.0 1.8 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" #if !defined(_BOOT) && !defined(_KMDB) -#include "synonyms.h" +#include "lint.h" #endif /* !_BOOT && !_KMDB */ #include <errno.h> #include <ctype.h> diff --git a/usr/src/head/wchar.h b/usr/src/head/wchar.h index 7e1c0f0dab..41a36de3ac 100644 --- a/usr/src/head/wchar.h +++ b/usr/src/head/wchar.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -142,7 +142,7 @@ extern wint_t towlower(wint_t); extern wint_t towupper(wint_t); extern wchar_t *wcswcs(const wchar_t *, const wchar_t *); extern int wcswidth(const wchar_t *, size_t); -extern int wcwidth(const wchar_t); +extern int wcwidth(wchar_t); extern wctype_t wctype(const char *); #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index cd2dd14e2a..d9f9398b12 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -63,6 +63,7 @@ $(CLOSED_BUILD)SUBDIRS += \ SUBDIRS += \ libc .WAIT \ ../cmd/sgs/libelf .WAIT \ + c_synonyms \ libmd \ libmd5 \ librsm \ diff --git a/usr/src/lib/Makefile.lib b/usr/src/lib/Makefile.lib index 57e5fe8d23..7c0c965a3c 100644 --- a/usr/src/lib/Makefile.lib +++ b/usr/src/lib/Makefile.lib @@ -58,8 +58,6 @@ SRCDIR = .. # MAPFILES = $(SRCDIR)/mapfile-vers -C_SYNONYMS_H= $(SRC)/lib/common/inc/c_synonyms.h - # # If HDRDIR is left unset, then it's possible for the $(ROOTHDRDIR)/% # install rule in lib/Makefile.targ to generate false matches if there diff --git a/usr/src/lib/Makefile.targ b/usr/src/lib/Makefile.targ index b30eb2b533..00e1d3946c 100644 --- a/usr/src/lib/Makefile.targ +++ b/usr/src/lib/Makefile.targ @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -101,9 +101,6 @@ $(DYNLIBCCC): pics .WAIT $$(PICS) $$(ALTPICS) $(BUILDCCC.SO) $(POST_PROCESS_SO) -fnamecheck: $(DYNLIB) - $(CHECK_FNAMES) -s $(C_SYNONYMS_H) -l $(DYNLIB) $(PICS) $(ALTPICS) - $(LINTLIB): $$(SRCS) $(LINT.c) -o $(LIBNAME) $(SRCS) > $(LINTOUT) 2>&1 diff --git a/usr/src/lib/brand/lx/lx_thunk/common/lx_thunk.c b/usr/src/lib/brand/lx/lx_thunk/common/lx_thunk.c index 8900e3a6d1..0e7b47d790 100644 --- a/usr/src/lib/brand/lx/lx_thunk/common/lx_thunk.c +++ b/usr/src/lib/brand/lx/lx_thunk/common/lx_thunk.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -166,8 +166,8 @@ init(void) * in just a second, so we won't be able to open it later. */ if ((debug_fd = open(lxt_debug_path, - O_WRONLY|O_APPEND|O_CREAT|O_NDELAY|O_NOCTTY, - 0666)) != -1) { + O_WRONLY|O_APPEND|O_CREAT|O_NDELAY|O_NOCTTY, + 0666)) != -1) { (void) fchmod(debug_fd, 0666); } } @@ -1042,8 +1042,9 @@ lxt_getservbyname_r(const char *name, const char *proto, /* * "Public" interfaces - used to override public existing interfaces */ +#pragma weak _close = close int -_close(int fd) +close(int fd) { static fp1_t fp = NULL; @@ -1057,7 +1058,7 @@ _close(int fd) return (0); if (fp == NULL) - fp = (fp1_t)dlsym(RTLD_NEXT, "_close"); + fp = (fp1_t)dlsym(RTLD_NEXT, "close"); return (fp((uintptr_t)fd)); } diff --git a/usr/src/lib/c_synonyms/Makefile b/usr/src/lib/c_synonyms/Makefile new file mode 100644 index 0000000000..7dd3697e29 --- /dev/null +++ b/usr/src/lib/c_synonyms/Makefile @@ -0,0 +1,47 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.lib + +SUBDIRS= $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) + +all := TARGET= all +install := TARGET= install +clean := TARGET= clean +clobber := TARGET= clobber + +.KEEP_STATE: + +all install clean clobber: $(SUBDIRS) + +lint check install_h: + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: diff --git a/usr/src/lib/c_synonyms/Makefile.com b/usr/src/lib/c_synonyms/Makefile.com new file mode 100644 index 0000000000..cfea924839 --- /dev/null +++ b/usr/src/lib/c_synonyms/Makefile.com @@ -0,0 +1,73 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +LIBRARY = c_synonyms.a +VERS = .1 + +OBJECTS = synonyms.o + +include ../../Makefile.lib +include ../../Makefile.rootfs + +LIBS = $(DYNLIB) +LDLIBS += -lc + +BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS) + +CLEANFILES += synonym_list mapfile-vers + +.KEEP_STATE: + +all: $(LIBS) + +pics/synonyms.o: pics .WAIT synonym_list + +synonym_list: ../syn_common ../syn2_common syn_isa + $(CAT) ../syn_common syn_isa | \ + $(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/ SYN(&)/' >synonym_list + $(CAT) ../syn2_common | \ + $(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/ SYN2(&)/' >>synonym_list + +$(DYNLIB): mapfile-vers $(PICS) + +mapfile-vers: ../syn_common ../syn2_common syn_isa + echo "SUNWprivate_1.1 {\n global:" >mapfile-vers + $(CAT) ../syn_common syn_isa | \ + $(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/ _&;/' >>mapfile-vers + $(CAT) ../syn2_common | \ + $(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/ __&;/' >>mapfile-vers + echo " local:\n *;\n};" >>mapfile-vers + +BUILD.s= $(AS) $(ASFLAGS) $< -o $@ + +# include library targets +include ../../Makefile.targ + +MAPFILES = mapfile-vers + +pics/%.o: %.s + $(BUILD.s) diff --git a/usr/src/lib/c_synonyms/amd64/Makefile b/usr/src/lib/c_synonyms/amd64/Makefile new file mode 100644 index 0000000000..5cfacdba09 --- /dev/null +++ b/usr/src/lib/c_synonyms/amd64/Makefile @@ -0,0 +1,35 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +ASFLAGS= -K pic -P -D__STDC__ -D_ASM $(amd64_AS_XARCH) + +include ../Makefile.com +include ../../Makefile.lib.64 + +BUILD.SO= $(LD) -o $@ -G -64 $(DYNFLAGS) $(PICS) $(LDLIBS) + +install: all $(ROOTLIBS64) diff --git a/usr/src/lib/c_synonyms/amd64/syn_isa b/usr/src/lib/c_synonyms/amd64/syn_isa new file mode 100644 index 0000000000..cb92fa20bb --- /dev/null +++ b/usr/src/lib/c_synonyms/amd64/syn_isa @@ -0,0 +1,38 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# +# This is the supplemental list of functions in the 64-bit x86 libc that +# historically have had synonym names with a leading underscore, as in: +# sysi86() +# _sysi86() +# See the 'syn_common' file in the parent directory +# for the list of names common to all ISAs. +# + +_fpstart +dlamd64getunwind +sysi86 diff --git a/usr/src/lib/c_synonyms/amd64/synonyms.s b/usr/src/lib/c_synonyms/amd64/synonyms.s new file mode 100644 index 0000000000..783b3c03bd --- /dev/null +++ b/usr/src/lib/c_synonyms/amd64/synonyms.s @@ -0,0 +1,51 @@ +/* + * 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. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" + +#define SYN(name) \ + .align 16; \ + .globl name; \ + .globl _/**/name; \ + .type _/**/name, @function; \ +_/**/name: \ + movq name@GOTPCREL(%rip), %rax; \ + jmp *%rax; \ + .size _/**/name, [. - _/**/name] + +#define SYN2(name) \ + .align 16; \ + .globl name; \ + .globl __/**/name; \ + .type __/**/name, @function; \ +__/**/name: \ + movq name@GOTPCREL(%rip), %rax; \ + jmp *%rax; \ + .size __/**/name, [. - __/**/name] + +#include "synonym_list" diff --git a/usr/src/lib/c_synonyms/i386/Makefile b/usr/src/lib/c_synonyms/i386/Makefile new file mode 100644 index 0000000000..0670d3021e --- /dev/null +++ b/usr/src/lib/c_synonyms/i386/Makefile @@ -0,0 +1,34 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +ASFLAGS= -K pic -P -D__STDC__ -D_ASM $(i386_AS_XARCH) + +include ../Makefile.com + +MAPFILES += mapfile-vers + +install: all $(ROOTLIBS) diff --git a/usr/src/lib/c_synonyms/i386/syn_isa b/usr/src/lib/c_synonyms/i386/syn_isa new file mode 100644 index 0000000000..e9f96e5206 --- /dev/null +++ b/usr/src/lib/c_synonyms/i386/syn_isa @@ -0,0 +1,70 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# +# This is the supplemental list of functions in the 32-bit x86 libc that +# historically have had synonym names with a leading underscore, as in: +# sysi86() +# _sysi86() +# See the 'syn_common' file in the parent directory +# for the list of names common to all ISAs. +# + +_fpstart +alphasort64 +attropen64 +creat64 +fstat64 +fstatat64 +fstatvfs64 +ftruncate64 +ftw64 +getdents64 +getrlimit64 +lockf64 +lseek64 +lstat64 +mkstemp64 +mkstemps64 +mmap64 +nftw64 +nuname +open64 +openat64 +pread64 +ptrace +pwrite64 +readdir64 +readdir64_r +s_fcntl +scandir64 +setrlimit64 +stat64 +statvfs64 +sysi86 +tell64 +truncate64 diff --git a/usr/src/lib/c_synonyms/i386/synonyms.s b/usr/src/lib/c_synonyms/i386/synonyms.s new file mode 100644 index 0000000000..a967265b90 --- /dev/null +++ b/usr/src/lib/c_synonyms/i386/synonyms.s @@ -0,0 +1,57 @@ +/* + * 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. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" + +#define SYN(name) \ + .align 16; \ + .globl name; \ + .globl _/**/name; \ + .type _/**/name, @function; \ +_/**/name: \ + call 1f; \ +1: popl %eax; \ + addl $_GLOBAL_OFFSET_TABLE_ + [. - 1b], %eax;\ + movl name@GOT(%eax), %eax; \ + jmp *%eax; \ + .size _/**/name, [. - _/**/name] + +#define SYN2(name) \ + .align 16; \ + .globl name; \ + .globl __/**/name; \ + .type __/**/name, @function; \ +__/**/name: \ + call 1f; \ +1: popl %eax; \ + addl $_GLOBAL_OFFSET_TABLE_ + [. - 1b], %eax;\ + movl name@GOT(%eax), %eax; \ + jmp *%eax; \ + .size __/**/name, [. - __/**/name] + +#include "synonym_list" diff --git a/usr/src/lib/c_synonyms/sparc/Makefile b/usr/src/lib/c_synonyms/sparc/Makefile new file mode 100644 index 0000000000..f9643fd890 --- /dev/null +++ b/usr/src/lib/c_synonyms/sparc/Makefile @@ -0,0 +1,32 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +ASFLAGS= -K pic -P -D__STDC__ -D_ASM $(sparc_AS_XARCH) + +include ../Makefile.com + +install: all $(ROOTLIBS) diff --git a/usr/src/lib/c_synonyms/sparc/syn_isa b/usr/src/lib/c_synonyms/sparc/syn_isa new file mode 100644 index 0000000000..bfad0393f1 --- /dev/null +++ b/usr/src/lib/c_synonyms/sparc/syn_isa @@ -0,0 +1,69 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# +# This is the supplemental list of functions in the 32-bit sparc libc that +# historically have had synonym names with a leading underscore, as in: +# open64() +# _open64() +# See the 'syn_common' file in the parent directory +# for the list of names common to all ISAs. +# + +__makecontext_v2 +alphasort64 +attropen64 +creat64 +fstat64 +fstatat64 +fstatvfs64 +ftruncate64 +ftw64 +getdents64 +getrlimit64 +install_utrap +lockf64 +lseek64 +lstat64 +mkstemp64 +mkstemps64 +mmap64 +nftw64 +open64 +openat64 +pread64 +ptrace +pwrite64 +readdir64 +readdir64_r +s_fcntl +scandir64 +setrlimit64 +stat64 +statvfs64 +tell64 +truncate64 diff --git a/usr/src/lib/c_synonyms/sparc/synonyms.s b/usr/src/lib/c_synonyms/sparc/synonyms.s new file mode 100644 index 0000000000..3c36a32870 --- /dev/null +++ b/usr/src/lib/c_synonyms/sparc/synonyms.s @@ -0,0 +1,53 @@ +/* + * 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. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" + +#define SYN(name) \ + .align 4; \ + .global name; \ + .global _/**/name; \ + .type _/**/name, #function; \ +_/**/name: \ + mov %o7, %g1; \ + call name; \ + mov %g1, %o7; \ + .size _/**/name, (. - _/**/name) + +#define SYN2(name) \ + .align 4; \ + .global name; \ + .global __/**/name; \ + .type __/**/name, #function; \ +__/**/name: \ + mov %o7, %g1; \ + call name; \ + mov %g1, %o7; \ + .size __/**/name, (. - __/**/name) + +#include "synonym_list" diff --git a/usr/src/lib/c_synonyms/sparcv9/Makefile b/usr/src/lib/c_synonyms/sparcv9/Makefile new file mode 100644 index 0000000000..13d51d128a --- /dev/null +++ b/usr/src/lib/c_synonyms/sparcv9/Makefile @@ -0,0 +1,35 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +ASFLAGS= -K pic -P -D__STDC__ -D_ASM $(sparcv9_AS_XARCH) + +include ../Makefile.com +include ../../Makefile.lib.64 + +BUILD.SO= $(LD) -o $@ -G -64 $(DYNFLAGS) $(PICS) $(LDLIBS) + +install: all $(ROOTLIBS64) diff --git a/usr/src/lib/c_synonyms/sparcv9/syn_isa b/usr/src/lib/c_synonyms/sparcv9/syn_isa new file mode 100644 index 0000000000..e0890ae18f --- /dev/null +++ b/usr/src/lib/c_synonyms/sparcv9/syn_isa @@ -0,0 +1,38 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# +# This is the supplemental list of functions in the 64-bit sparc libc that +# historically have had synonym names with a leading underscore, as in: +# install_utrap() +# _install_utrap() +# See the 'syn_common' file in the parent directory +# for the list of names common to all ISAs. +# + +__makecontext_v2 +install_utrap diff --git a/usr/src/lib/c_synonyms/sparcv9/synonyms.s b/usr/src/lib/c_synonyms/sparcv9/synonyms.s new file mode 100644 index 0000000000..3c36a32870 --- /dev/null +++ b/usr/src/lib/c_synonyms/sparcv9/synonyms.s @@ -0,0 +1,53 @@ +/* + * 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. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" + +#define SYN(name) \ + .align 4; \ + .global name; \ + .global _/**/name; \ + .type _/**/name, #function; \ +_/**/name: \ + mov %o7, %g1; \ + call name; \ + mov %g1, %o7; \ + .size _/**/name, (. - _/**/name) + +#define SYN2(name) \ + .align 4; \ + .global name; \ + .global __/**/name; \ + .type __/**/name, #function; \ +__/**/name: \ + mov %o7, %g1; \ + call name; \ + mov %g1, %o7; \ + .size __/**/name, (. - __/**/name) + +#include "synonym_list" diff --git a/usr/src/lib/c_synonyms/syn2_common b/usr/src/lib/c_synonyms/syn2_common new file mode 100644 index 0000000000..685e47c3ed --- /dev/null +++ b/usr/src/lib/c_synonyms/syn2_common @@ -0,0 +1,41 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# +# This is the list of functions in libc that historically have +# had synonym names with two leading underscores, as in: +# mutex_lock() +# __mutex_lock() +# + +mutex_consistent +mutex_destroy +mutex_held +mutex_init +mutex_lock +mutex_trylock +mutex_unlock diff --git a/usr/src/lib/c_synonyms/syn_common b/usr/src/lib/c_synonyms/syn_common new file mode 100644 index 0000000000..b8f4058348 --- /dev/null +++ b/usr/src/lib/c_synonyms/syn_common @@ -0,0 +1,998 @@ +# +# 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. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +# +# This is the list of functions in libc that historically have +# had synonym names with a leading underscore, as in: +# ascftime() +# _ascftime() +# Most of these synonyms have been removed from libc and the +# only way of calling them now is to preload c_synonyms.so.1 +# +# This is the list that is common among all of the supported ISAs. +# See the individual 'syn_isa' files in each ISA subdirectory for +# the supplemental lists of names specific to each individual ISA. +# + +_cladm +_lwp_cond_broadcast +_lwp_cond_reltimedwait +_lwp_cond_signal +_lwp_cond_timedwait +_lwp_cond_wait +_lwp_continue +_lwp_info +_lwp_kill +_lwp_mutex_lock +_lwp_mutex_trylock +_lwp_mutex_unlock +_lwp_self +_lwp_sema_init +_lwp_sema_post +_lwp_sema_trywait +_lwp_sema_wait +_lwp_suspend +a64l +access +acct +acctctl +acl +addseverity +adjtime +alarm +alphasort +ascftime +asctime_r +atoll +atomic_add_16 +atomic_add_16_nv +atomic_add_32 +atomic_add_32_nv +atomic_add_64 +atomic_add_64_nv +atomic_add_8 +atomic_add_8_nv +atomic_add_char +atomic_add_char_nv +atomic_add_int +atomic_add_int_nv +atomic_add_long +atomic_add_long_nv +atomic_add_ptr +atomic_add_ptr_nv +atomic_add_short +atomic_add_short_nv +atomic_and_16 +atomic_and_16_nv +atomic_and_32 +atomic_and_32_nv +atomic_and_64 +atomic_and_64_nv +atomic_and_8 +atomic_and_8_nv +atomic_and_uchar +atomic_and_uchar_nv +atomic_and_uint +atomic_and_uint_nv +atomic_and_ulong +atomic_and_ulong_nv +atomic_and_ushort +atomic_and_ushort_nv +atomic_cas_16 +atomic_cas_32 +atomic_cas_64 +atomic_cas_8 +atomic_cas_ptr +atomic_cas_uchar +atomic_cas_uint +atomic_cas_ulong +atomic_cas_ushort +atomic_clear_long_excl +atomic_dec_16 +atomic_dec_16_nv +atomic_dec_32 +atomic_dec_32_nv +atomic_dec_64 +atomic_dec_64_nv +atomic_dec_8 +atomic_dec_8_nv +atomic_dec_uchar +atomic_dec_uchar_nv +atomic_dec_uint +atomic_dec_uint_nv +atomic_dec_ulong +atomic_dec_ulong_nv +atomic_dec_ushort +atomic_dec_ushort_nv +atomic_inc_16 +atomic_inc_16_nv +atomic_inc_32 +atomic_inc_32_nv +atomic_inc_64 +atomic_inc_64_nv +atomic_inc_8 +atomic_inc_8_nv +atomic_inc_uchar +atomic_inc_uchar_nv +atomic_inc_uint +atomic_inc_uint_nv +atomic_inc_ulong +atomic_inc_ulong_nv +atomic_inc_ushort +atomic_inc_ushort_nv +atomic_or_16 +atomic_or_16_nv +atomic_or_32 +atomic_or_32_nv +atomic_or_64 +atomic_or_64_nv +atomic_or_8 +atomic_or_8_nv +atomic_or_uchar +atomic_or_uchar_nv +atomic_or_uint +atomic_or_uint_nv +atomic_or_ulong +atomic_or_ulong_nv +atomic_or_ushort +atomic_or_ushort_nv +atomic_set_long_excl +atomic_swap_16 +atomic_swap_32 +atomic_swap_64 +atomic_swap_8 +atomic_swap_ptr +atomic_swap_uchar +atomic_swap_uint +atomic_swap_ulong +atomic_swap_ushort +attropen +brk +catclose +catgets +catopen +cfgetispeed +cfgetospeed +cfsetispeed +cfsetospeed +cftime +chdir +chmod +chown +chroot +clock_getres +clock_gettime +clock_nanosleep +clock_settime +close +closedir +closefrom +closelog +cond_broadcast +cond_destroy +cond_init +cond_reltimedwait +cond_signal +cond_timedwait +cond_wait +core_get_default_content +core_get_default_path +core_get_global_content +core_get_global_path +core_get_options +core_get_process_content +core_get_process_path +core_set_default_content +core_set_default_path +core_set_global_content +core_set_global_path +core_set_options +core_set_process_content +core_set_process_path +creat +crypt +ctermid +ctermid_r +ctime_r +cuserid +decimal_to_double +decimal_to_extended +decimal_to_quadruple +decimal_to_single +defcntl +defopen +defread +dgettext +dirfd +dladdr +dladdr1 +dldump +dlclose +dlerror +dlinfo +dlopen +dlmopen +dlsym +door_bind +door_call +door_create +door_cred +door_getparam +door_info +door_return +door_revoke +door_server_create +door_setparam +door_ucred +door_unbind +double_to_decimal +drand48 +dup +dup2 +econvert +ecvt +encrypt +endgrent +endpwent +endspent +endutent +endutxent +erand48 +err +errx +execl +execle +execlp +execv +execve +execvp +exportfs +extended_to_decimal +facl +fattach +fchdir +fchmod +fchown +fchownat +fchroot +fcntl +fconvert +fcvt +fdatasync +fdetach +fdopen +fdopendir +fdwalk +ffs +fgetgrent +fgetgrent_r +fgetpwent +fgetpwent_r +fgetspent +fgetspent_r +file_to_decimal +fileno +finite +flockfile +fmtmsg +fork +fork1 +forkall +forkallx +forkx +fpathconf +fpclass +fpgetmask +fpgetround +fpgetsticky +fprintf +fpsetmask +fpsetround +fpsetsticky +fstat +fstatat +fstatfs +fstatvfs +fsync +ftok +ftruncate +ftrylockfile +ftw +func_to_decimal +funlockfile +futimesat +gconvert +gcvt +getacct +getc_unlocked +getchar_unlocked +getcontext +getcpuid +getcwd +getdate +getdents +getegid +geteuid +getexecname +getgid +getgrent +getgrent_r +getgrgid +getgrgid_r +getgrnam +getgrnam_r +getgroups +gethomelgroup +getisax +getitimer +getlogin +getlogin_r +getmntany +getmntent +getmsg +getopt +getopt_clip +getopt_long +getopt_long_only +getpagesizes +getpagesizes2 +getpass +getpeerucred +getpflags +getpgid +getpgrp +getpid +getpmsg +getppid +getppriv +getprivimplinfo +getprojid +getpw +getpwent +getpwent_r +getpwnam +getpwnam_r +getpwuid +getpwuid_r +getrctl +getrlimit +getsid +getspent +getspent_r +getspnam +getspnam_r +getsubopt +gettaskid +gettimeofday +gettxt +getuid +getustack +getutent +getutid +getutline +getutmp +getutmpx +getutxent +getutxid +getutxline +getvfsany +getvfsent +getvfsfile +getvfsspec +getw +getzoneid +getzoneidbyname +getzonenamebyid +gmtime_r +grantpt +gsignal +gtty +hasmntopt +hcreate +hdestroy +hsearch +iconv +iconv_close +iconv_open +initgroups +insque +inst_sync +ioctl +is_system_labeled +isascii +isastream +isatty +issetugid +jrand48 +kill +l64a +ladd +lchown +lckpwdf +lcong48 +ldivide +lexp10 +lfind +link +llabs +lldiv +llog10 +llseek +lltostr +lmul +localtime_r +lockf +longjmp +lrand48 +lsearch +lseek +lshiftl +lstat +lsub +madvise +makecontext +makeut +makeutx +membar_consumer +membar_enter +membar_exit +membar_producer +memccpy +memcmp +memcntl +memcpy +meminfo +memmove +memset +mincore +mkdir +mkdtemp +mkfifo +mknod +mkstemp +mkstemps +mktemp +mlock +mlockall +mmap +modutx +monitor +mount +mprotect +mrand48 +msgctl +msgctl64 +msgget +msgids +msgrcv +msgsnap +msgsnd +msync +munlock +munlockall +munmap +mutex_consistent +mutex_destroy +mutex_held +mutex_init +mutex_lock +mutex_trylock +mutex_unlock +nanosleep +nfs_getfh +nfssvc +nftw +nice +nl_langinfo +nrand48 +nss_delete +nss_endent +nss_getent +nss_search +nss_setent +ntp_adjtime +ntp_gettime +open +openat +opendir +openlog +pathconf +pause +pclose +pipe +plock +poll +popen +port_alert +port_associate +port_create +port_dissociate +port_get +port_getn +port_send +port_sendn +posix_openpt +posix_spawn +posix_spawn_file_actions_addclose +posix_spawn_file_actions_adddup2 +posix_spawn_file_actions_addopen +posix_spawn_file_actions_destroy +posix_spawn_file_actions_init +posix_spawnattr_destroy +posix_spawnattr_getflags +posix_spawnattr_getpgroup +posix_spawnattr_getschedparam +posix_spawnattr_getschedpolicy +posix_spawnattr_getsigdefault +posix_spawnattr_getsigmask +posix_spawnattr_init +posix_spawnattr_setflags +posix_spawnattr_setpgroup +posix_spawnattr_setschedparam +posix_spawnattr_setschedpolicy +posix_spawnattr_setsigdefault +posix_spawnattr_setsigmask +posix_spawnp +pread +printstack +priv_addset +priv_allocset +priv_copyset +priv_delset +priv_emptyset +priv_fillset +priv_freeset +priv_getbyname +priv_getbynum +priv_getsetbyname +priv_getsetbynum +priv_gettext +priv_ineffect +priv_intersect +priv_inverse +priv_isemptyset +priv_isequalset +priv_isfullset +priv_ismember +priv_issubset +priv_set +priv_set_to_str +priv_str_to_set +priv_union +profil +pselect +psiginfo +psignal +pthread_atfork +pthread_attr_destroy +pthread_attr_getdetachstate +pthread_attr_getguardsize +pthread_attr_getinheritsched +pthread_attr_getschedparam +pthread_attr_getschedpolicy +pthread_attr_getscope +pthread_attr_getstack +pthread_attr_getstackaddr +pthread_attr_getstacksize +pthread_attr_init +pthread_attr_setdetachstate +pthread_attr_setguardsize +pthread_attr_setinheritsched +pthread_attr_setschedparam +pthread_attr_setschedpolicy +pthread_attr_setscope +pthread_attr_setstack +pthread_attr_setstackaddr +pthread_attr_setstacksize +pthread_barrier_destroy +pthread_barrier_init +pthread_barrier_wait +pthread_barrierattr_destroy +pthread_barrierattr_getpshared +pthread_barrierattr_init +pthread_barrierattr_setpshared +pthread_cancel +pthread_cond_broadcast +pthread_cond_destroy +pthread_cond_init +pthread_cond_reltimedwait_np +pthread_cond_signal +pthread_cond_timedwait +pthread_cond_wait +pthread_condattr_destroy +pthread_condattr_getclock +pthread_condattr_getpshared +pthread_condattr_init +pthread_condattr_setclock +pthread_condattr_setpshared +pthread_create +pthread_detach +pthread_equal +pthread_exit +pthread_getconcurrency +pthread_getschedparam +pthread_getspecific +pthread_join +pthread_key_create +pthread_key_create_once_np +pthread_key_delete +pthread_kill +pthread_mutex_consistent_np +pthread_mutex_destroy +pthread_mutex_getprioceiling +pthread_mutex_init +pthread_mutex_lock +pthread_mutex_reltimedlock_np +pthread_mutex_setprioceiling +pthread_mutex_timedlock +pthread_mutex_trylock +pthread_mutex_unlock +pthread_mutexattr_destroy +pthread_mutexattr_getprioceiling +pthread_mutexattr_getprotocol +pthread_mutexattr_getpshared +pthread_mutexattr_getrobust_np +pthread_mutexattr_gettype +pthread_mutexattr_init +pthread_mutexattr_setprioceiling +pthread_mutexattr_setprotocol +pthread_mutexattr_setpshared +pthread_mutexattr_setrobust_np +pthread_mutexattr_settype +pthread_once +pthread_rwlock_destroy +pthread_rwlock_init +pthread_rwlock_rdlock +pthread_rwlock_reltimedrdlock_np +pthread_rwlock_reltimedwrlock_np +pthread_rwlock_timedrdlock +pthread_rwlock_timedwrlock +pthread_rwlock_tryrdlock +pthread_rwlock_trywrlock +pthread_rwlock_unlock +pthread_rwlock_wrlock +pthread_rwlockattr_destroy +pthread_rwlockattr_getpshared +pthread_rwlockattr_init +pthread_rwlockattr_setpshared +pthread_self +pthread_setcancelstate +pthread_setcanceltype +pthread_setconcurrency +pthread_setschedparam +pthread_setschedprio +pthread_setspecific +pthread_sigmask +pthread_spin_destroy +pthread_spin_init +pthread_spin_lock +pthread_spin_trylock +pthread_spin_unlock +pthread_testcancel +ptsname +putacct +putc_unlocked +putchar_unlocked +putenv +putmsg +putpmsg +putpwent +putspent +pututline +pututxline +putw +pwrite +qeconvert +qecvt +qfconvert +qfcvt +qgconvert +qgcvt +quadruple_to_decimal +rand_r +rctlctl +rctllist +read +readdir +readdir_r +readlink +readv +realpath +remque +rename +renameat +resolvepath +rewinddir +rmdir +rw_rdlock +rw_read_held +rw_tryrdlock +rw_trywrlock +rw_unlock +rw_write_held +rw_wrlock +rwlock_destroy +rwlock_init +sbrk +scandir +schedctl_exit +schedctl_init +schedctl_lookup +seconvert +seed48 +seekdir +select +sem_close +sem_destroy +sem_getvalue +sem_init +sem_open +sem_post +sem_reltimedwait_np +sem_timedwait +sem_trywait +sem_unlink +sem_wait +sema_destroy +sema_held +sema_init +sema_post +sema_reltimedwait +sema_timedwait +sema_trywait +sema_wait +semctl +semctl64 +semget +semids +semop +semtimedop +setcontext +setegid +setenv +seteuid +setgid +setgrent +setgroups +setitimer +setjmp +setkey +setlogmask +setpflags +setpgid +setpgrp +setppriv +setprojrctl +setpwent +setrctl +setregid +setreuid +setrlimit +setsid +setspent +settaskid +settimeofday +setuid +setustack +setutent +setutxent +sfconvert +sgconvert +shmat +shmctl +shmctl64 +shmdt +shmget +shmids +sig2str +sigaction +sigaddset +sigaltstack +sigdelset +sigemptyset +sigfillset +sigflag +sigfpe +sighold +sigignore +siginterrupt +sigismember +siglongjmp +signal +sigpause +sigpending +sigprocmask +sigqueue +sigrelse +sigsend +sigsendset +sigset +sigsetjmp +sigstack +sigsuspend +sigtimedwait +sigwait +sigwaitinfo +single_to_decimal +sleep +srand48 +ssignal +stack_getbounds +stack_inbounds +stack_setbounds +stack_violation +stat +statfs +statvfs +stime +str2sig +strdup +strerror +strerror_r +string_to_decimal +strsignal +strtok_r +strtoll +strtoull +stty +swab +swapcontext +swapctl +symlink +sync +syscall +sysconf +sysfs +sysinfo +syslog +tcdrain +tcflow +tcflush +tcgetattr +tcgetpgrp +tcgetsid +tcsendbreak +tcsetattr +tcsetpgrp +tdelete +tell +telldir +tempnam +tfind +thr_continue +thr_continue_allmutators +thr_continue_mutator +thr_create +thr_exit +thr_getconcurrency +thr_getprio +thr_getspecific +thr_getstate +thr_join +thr_keycreate +thr_keycreate_once +thr_kill +thr_main +thr_min_stack +thr_mutators_barrier +thr_self +thr_setconcurrency +thr_setmutator +thr_setprio +thr_setspecific +thr_setstate +thr_sighndlrinfo +thr_sigsetmask +thr_stksegment +thr_suspend +thr_suspend_allmutators +thr_suspend_mutator +thr_wait_mutator +thr_yield +time +timer_create +timer_delete +timer_getoverrun +timer_gettime +timer_settime +times +tmpnam +tmpnam_r +toascii +truncate +tsearch +ttyname +ttyname_r +ttyslot +twalk +tzset +uadmin +ucred_free +ucred_get +ucred_getamask +ucred_getasid +ucred_getatid +ucred_getauid +ucred_getegid +ucred_geteuid +ucred_getgroups +ucred_getlabel +ucred_getpflags +ucred_getpid +ucred_getprivset +ucred_getprojid +ucred_getrgid +ucred_getruid +ucred_getsgid +ucred_getsuid +ucred_getzoneid +ucred_size +ulckpwdf +ulimit +ulltostr +umask +umount +umount2 +uname +unlink +unlinkat +unlockpt +unordered +unsetenv +updwtmp +updwtmpx +usleep +ustat +utime +utimes +utmpname +utmpxname +utssys +verr +verrx +vfork +vforkx +vfscanf +vhangup +vscanf +vsscanf +vsyslog +vwarn +vwarnx +wait +wait3 +wait4 +waitid +waitpid +walkcontext +warn +warnx +wctomb +wracct +write +writev +yield diff --git a/usr/src/lib/common/i386/crt1.s b/usr/src/lib/common/i386/crt1.s index dbac57eee9..2e2b1d7498 100644 --- a/usr/src/lib/common/i386/crt1.s +++ b/usr/src/lib/common/i386/crt1.s @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,9 +30,9 @@ * where it will be picked up by gcc, along with crti.o and crtn.o */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" - .file "crt1.s" + .file "%M%" .globl _start @@ -57,7 +57,7 @@ _environ: .globl __environ_lock .type __environ_lock,@object .size __environ_lock,24 - .align 4 + .align 8 __environ_lock: .zero 24 diff --git a/usr/src/lib/extendedFILE/common/extendedFILE.c b/usr/src/lib/extendedFILE/common/extendedFILE.c index b3f4fc6721..68397bae34 100644 --- a/usr/src/lib/extendedFILE/common/extendedFILE.c +++ b/usr/src/lib/extendedFILE/common/extendedFILE.c @@ -20,13 +20,12 @@ */ /* - * Copyright 2006 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" -#include "c_synonyms.h" #include <sys/types.h> #include <errno.h> #include <fcntl.h> diff --git a/usr/src/lib/libavl/Makefile.com b/usr/src/lib/libavl/Makefile.com index 0627681a93..4437ca826d 100644 --- a/usr/src/lib/libavl/Makefile.com +++ b/usr/src/lib/libavl/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -43,7 +43,7 @@ CFLAGS += $(CCVERBOSE) .KEEP_STATE: -all : $(LIBS) fnamecheck +all : $(LIBS) lint : lintcheck diff --git a/usr/src/lib/libbc/libc/sys/common/syscall.c b/usr/src/lib/libbc/libc/sys/common/syscall.c index f5ebad51de..79b67e7e03 100644 --- a/usr/src/lib/libbc/libc/sys/common/syscall.c +++ b/usr/src/lib/libbc/libc/sys/common/syscall.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -146,7 +146,7 @@ syscall(int sysnum, ...) c3 = va_arg(ap, char *); c4 = va_arg(ap, char *); va_end(ap); - return (_select(i1, c1, c2, c3, c4)); + return (select(i1, c1, c2, c3, c4)); case XSYS_ioctl : i1 = va_arg(ap, int); i2 = va_arg(ap, int); diff --git a/usr/src/lib/libbsm/common/adt.c b/usr/src/lib/libbsm/common/adt.c index 1f3c8b61ed..fa5d816ea5 100644 --- a/usr/src/lib/libbsm/common/adt.c +++ b/usr/src/lib/libbsm/common/adt.c @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -65,9 +66,6 @@ static void adt_setto_unaudited(adt_internal_state_t *); #define DFLUSH #endif -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - static int auditstate = AUC_DISABLED; /* default state */ /* @@ -1913,12 +1911,12 @@ adt_generate_event(const adt_event_data_t *p_extdata, * as subject are set to -1 by adt_calcOffset() */ if (p_xlate->tx_offsetsCalculated == 0) { - (void) _mutex_lock(&lock); + (void) mutex_lock(&lock); p_xlate->tx_offsetsCalculated = 1; adt_calcOffsets(p_xlate->tx_top_entry, p_xlate->tx_entries, (void *)p_extdata); - (void) _mutex_unlock(&lock); + (void) mutex_unlock(&lock); } while (p_entry != NULL) { adt_generate_token(p_entry, (char *)p_extdata, diff --git a/usr/src/lib/libbsm/common/au_open.c b/usr/src/lib/libbsm/common/au_open.c index abd76fa75d..d1058ab3a4 100644 --- a/usr/src/lib/libbsm/common/au_open.c +++ b/usr/src/lib/libbsm/common/au_open.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -53,9 +53,6 @@ #define AU_TABLE_LENGTH 16 #define AU_TABLE_MAX 256 -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - static token_t **au_d; static int au_d_length = 0; /* current table length */ static int au_d_required_length = AU_TABLE_LENGTH; /* new table length */ @@ -71,7 +68,7 @@ au_open() int d; /* descriptor */ token_t **au_d_new; - _mutex_lock(&mutex_au_d); + (void) mutex_lock(&mutex_au_d); if (au_d_required_length > au_d_length) { au_d_new = (token_t **)calloc(au_d_required_length, @@ -79,7 +76,7 @@ au_open() if (au_d_new == NULL) { au_d_required_length = au_d_length; - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (-1); } if (au_d_length > 0) { @@ -93,7 +90,7 @@ au_open() for (d = 0; d < au_d_length; d++) { if (au_d[d] == (token_t *)0) { au_d[d] = (token_t *)&au_d; - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (d); } } @@ -103,11 +100,11 @@ au_open() * Logic here expects AU_TABLE_MAX to be multiple of AU_TABLE_LENGTH */ if (au_d_length >= AU_TABLE_MAX) { - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (-1); } au_d_required_length += AU_TABLE_LENGTH; - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (au_open()); } @@ -132,19 +129,19 @@ au_write(d, m) return (-1); if (m == (token_t *)0) return (-1); - _mutex_lock(&mutex_au_d); + (void) mutex_lock(&mutex_au_d); if ((d >= au_d_length) || (au_d[d] == (token_t *)0)) { - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (-1); } else if (au_d[d] == (token_t *)&au_d) { au_d[d] = m; - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (0); } for (mp = au_d[d]; mp->tt_next != (token_t *)0; mp = mp->tt_next) ; mp->tt_next = m; - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (0); } @@ -175,17 +172,17 @@ au_close(d, right, e_type) int byte_count; /* bytes in the record */ int v; - _mutex_lock(&mutex_au_d); + (void) mutex_lock(&mutex_au_d); if (d < 0 || d >= au_d_length || ((dchain = au_d[d]) == (token_t *)0)) { - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (-1); } au_d[d] = (token_t *)0; if (dchain == (token_t *)&au_d) { - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (0); } /* @@ -198,7 +195,7 @@ au_close(d, right, e_type) free(record->tt_data); free(record); } - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (0); } @@ -281,6 +278,6 @@ au_close(d, right, e_type) */ v = audit((caddr_t)buffer, byte_count); free(buffer); - _mutex_unlock(&mutex_au_d); + (void) mutex_unlock(&mutex_au_d); return (v); } diff --git a/usr/src/lib/libbsm/common/au_preselect.c b/usr/src/lib/libbsm/common/au_preselect.c index 3478311257..5d64b7a0e2 100644 --- a/usr/src/lib/libbsm/common/au_preselect.c +++ b/usr/src/lib/libbsm/common/au_preselect.c @@ -18,13 +18,14 @@ * * CDDL HEADER END */ -#pragma ident "%Z%%M% %I% %E% SMI" /* - * Copyright 2007 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" + /* * au_preselect.c */ @@ -54,9 +55,6 @@ static uint_t alloc_count; /* number of entries currently allocated */ static uint_t event_count; /* number of entries in map */ static mutex_t mutex_au_preselect = DEFAULTMUTEX; -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - /* * au_preselect: * @@ -84,15 +82,15 @@ au_preselect(au_event, au_mask_p, sorf, flag) register int i; register au_class_t comp_class; - _mutex_lock(&mutex_au_preselect); + (void) mutex_lock(&mutex_au_preselect); if (!been_here_before) { if (alloc_map() == -1) { - _mutex_unlock(&mutex_au_preselect); + (void) mutex_unlock(&mutex_au_preselect); return (-1); } if (load_map() == -1) { - _mutex_unlock(&mutex_au_preselect); + (void) mutex_unlock(&mutex_au_preselect); return (-1); } @@ -104,7 +102,7 @@ au_preselect(au_event, au_mask_p, sorf, flag) */ if (flag == AU_PRS_REREAD) { if (load_map() == -1) { - _mutex_unlock(&mutex_au_preselect); + (void) mutex_unlock(&mutex_au_preselect); return (-1); } } @@ -120,16 +118,16 @@ au_preselect(au_event, au_mask_p, sorf, flag) for (i = 0; i < event_count; i++) { if (event_map[i].event == au_event) { if (event_map[i].class & comp_class) { - _mutex_unlock(&mutex_au_preselect); + (void) mutex_unlock(&mutex_au_preselect); return (1); } else { - _mutex_unlock(&mutex_au_preselect); + (void) mutex_unlock(&mutex_au_preselect); return (0); } } } - _mutex_unlock(&mutex_au_preselect); + (void) mutex_unlock(&mutex_au_preselect); return (-1); /* could not find event in the table */ } diff --git a/usr/src/lib/libbsm/common/audit_class.c b/usr/src/lib/libbsm/common/audit_class.c index 94f2a6d2a7..5212b4b7ed 100644 --- a/usr/src/lib/libbsm/common/audit_class.c +++ b/usr/src/lib/libbsm/common/audit_class.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,29 +44,26 @@ static FILE *au_class_file = NULL; static mutex_t mutex_classfile = DEFAULTMUTEX; static mutex_t mutex_classcache = DEFAULTMUTEX; -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - void setauclass() { - _mutex_lock(&mutex_classfile); + (void) mutex_lock(&mutex_classfile); if (au_class_file) { (void) fseek(au_class_file, 0L, 0); } - _mutex_unlock(&mutex_classfile); + (void) mutex_unlock(&mutex_classfile); } void endauclass() { - _mutex_lock(&mutex_classfile); + (void) mutex_lock(&mutex_classfile); if (au_class_file) { (void) fclose(au_class_file); au_class_file = NULL; } - _mutex_unlock(&mutex_classfile); + (void) mutex_unlock(&mutex_classfile); } /* @@ -107,10 +105,10 @@ getauclassent_r(au_class_entry) } /* open audit class file if it isn't already */ - _mutex_lock(&mutex_classfile); + (void) mutex_lock(&mutex_classfile); if (!au_class_file) { if (!(au_class_file = fopen(au_class_fname, "rF"))) { - _mutex_unlock(&mutex_classfile); + (void) mutex_unlock(&mutex_classfile); return ((au_class_ent_t *)0); } } @@ -152,7 +150,7 @@ getauclassent_r(au_class_entry) } } - _mutex_unlock(&mutex_classfile); + (void) mutex_unlock(&mutex_classfile); if (!error && found) { return (au_class_entry); @@ -228,12 +226,12 @@ xcacheauclass(result, class_name, class_no, flags) int hit = 0; char *s; - _mutex_lock(&mutex_classcache); + (void) mutex_lock(&mutex_classcache); if (called_once == 0) { /* Count number of lines in the class file */ if ((fp = fopen(au_class_fname, "rF")) == NULL) { - _mutex_unlock(&mutex_classcache); + (void) mutex_unlock(&mutex_classcache); return (-1); } while (fgets(line, 256, fp) != NULL) { @@ -247,7 +245,7 @@ xcacheauclass(result, class_name, class_no, flags) class_tbl = (au_class_ent_t **)calloc((size_t)lines + 1, sizeof (au_class_ent_t)); if (class_tbl == NULL) { - _mutex_unlock(&mutex_classcache); + (void) mutex_unlock(&mutex_classcache); return (-2); } @@ -262,7 +260,7 @@ xcacheauclass(result, class_name, class_no, flags) class_tbl[lines] = (au_class_ent_t *) malloc(sizeof (au_class_ent_t)); if (class_tbl[lines] == NULL) { - _mutex_unlock(&mutex_classcache); + (void) mutex_unlock(&mutex_classcache); return (-3); } class_tbl[lines]->ac_name = strdup(p_class->ac_name); @@ -278,7 +276,7 @@ xcacheauclass(result, class_name, class_no, flags) class_tbl[invalid] = (au_class_ent_t *) malloc(sizeof (au_class_ent_t)); if (class_tbl[invalid] == NULL) { - _mutex_unlock(&mutex_classcache); + (void) mutex_unlock(&mutex_classcache); return (-4); } class_tbl[invalid]->ac_name = "invalid class"; @@ -312,7 +310,7 @@ xcacheauclass(result, class_name, class_no, flags) } } } - _mutex_unlock(&mutex_classcache); + (void) mutex_unlock(&mutex_classcache); return (hit); } diff --git a/usr/src/lib/libbsm/common/audit_event.c b/usr/src/lib/libbsm/common/audit_event.c index ad4a5b033a..f35d4c939b 100644 --- a/usr/src/lib/libbsm/common/audit_event.c +++ b/usr/src/lib/libbsm/common/audit_event.c @@ -18,13 +18,14 @@ * * CDDL HEADER END */ -#pragma ident "%Z%%M% %I% %E% SMI" /* - * Copyright 2007 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" + /* * Interfaces to audit_event(5) (/etc/security/audit_event) */ @@ -67,30 +68,27 @@ static mutex_t mutex_eventcache = DEFAULTMUTEX; */ static int cacheauclass_failure = 0; -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - void setauevent() { - _mutex_lock(&mutex_eventfile); + (void) mutex_lock(&mutex_eventfile); if (au_event_file) { (void) fseek(au_event_file, 0L, 0); } - _mutex_unlock(&mutex_eventfile); + (void) mutex_unlock(&mutex_eventfile); } void endauevent() { - _mutex_lock(&mutex_eventfile); + (void) mutex_lock(&mutex_eventfile); if (au_event_file) { (void) fclose(au_event_file); au_event_file = (FILE *)0; } - _mutex_unlock(&mutex_eventfile); + (void) mutex_unlock(&mutex_eventfile); } au_event_ent_t * @@ -116,10 +114,10 @@ getauevent_r(au_event_entry) char trim_buf[AU_EVENT_NAME_MAX+1]; /* open audit event file if it isn't already */ - _mutex_lock(&mutex_eventfile); + (void) mutex_lock(&mutex_eventfile); if (!au_event_file) if (!(au_event_file = fopen(au_event_fname, "rF"))) { - _mutex_unlock(&mutex_eventfile); + (void) mutex_unlock(&mutex_eventfile); return ((au_event_ent_t *)0); } @@ -168,7 +166,7 @@ getauevent_r(au_event_entry) break; } } - _mutex_unlock(&mutex_eventfile); + (void) mutex_unlock(&mutex_eventfile); if (!error && found) { return (au_event_entry); @@ -314,12 +312,12 @@ cacheauevent(result, event_number) int hit = 0; char *s; - _mutex_lock(&mutex_eventcache); + (void) mutex_lock(&mutex_eventcache); if (called_once == 0) { /* Count number of lines in the events file */ if ((fp = fopen(au_event_fname, "rF")) == NULL) { - _mutex_unlock(&mutex_eventcache); + (void) mutex_unlock(&mutex_eventcache); return (-1); } while (fgets(line, AU_EVENT_LINE_MAX, fp) != NULL) { @@ -340,7 +338,7 @@ cacheauevent(result, event_number) p_tbl = calloc(lines + 1, sizeof (au_event_ent_t)); if (p_tbl == NULL) { - _mutex_unlock(&mutex_eventcache); + (void) mutex_unlock(&mutex_eventcache); return (-2); } lines = 0; @@ -351,7 +349,7 @@ cacheauevent(result, event_number) p_tbl[lines] = (au_event_ent_t *) malloc(sizeof (au_event_ent_t)); if (p_tbl[lines] == NULL) { - _mutex_unlock(&mutex_eventcache); + (void) mutex_unlock(&mutex_eventcache); return (-3); } p_tbl[lines]->ae_number = p_event->ae_number; @@ -374,7 +372,7 @@ cacheauevent(result, event_number) p_tbl[invalid] = (au_event_ent_t *) malloc(sizeof (au_event_ent_t)); if (p_tbl[invalid] == NULL) { - _mutex_unlock(&mutex_eventcache); + (void) mutex_unlock(&mutex_eventcache); return (-4); } p_tbl[invalid]->ae_number = -1; @@ -393,7 +391,7 @@ cacheauevent(result, event_number) /* get space for the index_tbl */ index_tbl = calloc(max+1, sizeof (au_event_ent_t *)); if (index_tbl == NULL) { - _mutex_unlock(&mutex_eventcache); + (void) mutex_unlock(&mutex_eventcache); return (-5); } @@ -417,7 +415,7 @@ cacheauevent(result, event_number) *result = index_tbl[(ushort_t)event_number]; hit = 1; } - _mutex_unlock(&mutex_eventcache); + (void) mutex_unlock(&mutex_eventcache); return (hit); } diff --git a/usr/src/lib/libbsm/common/audit_mountd.c b/usr/src/lib/libbsm/common/audit_mountd.c index 177b792d46..81385288e8 100644 --- a/usr/src/lib/libbsm/common/audit_mountd.c +++ b/usr/src/lib/libbsm/common/audit_mountd.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -51,9 +51,6 @@ static mutex_t audit_mountd_lock = DEFAULTMUTEX; static int cannotaudit = 0; -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - /* * This setup call is made only once at the start of mountd. * The call sets the auditing state off if appropriate, and is @@ -81,7 +78,7 @@ int sorf; /* flag for success or failure */ if (cannotaudit) return; - (void) _mutex_lock(&audit_mountd_lock); + (void) mutex_lock(&audit_mountd_lock); (void) aug_save_namask(); @@ -93,7 +90,7 @@ int sorf; /* flag for success or failure */ (void) aug_get_machine(clname, buf, &type); aug_save_tid_ex(aug_get_port(), buf, type); (void) aug_audit(); - (void) _mutex_unlock(&audit_mountd_lock); + (void) mutex_unlock(&audit_mountd_lock); } void @@ -108,7 +105,7 @@ char *path; /* mount path */ if (cannotaudit) return; - (void) _mutex_lock(&audit_mountd_lock); + (void) mutex_lock(&audit_mountd_lock); (void) aug_save_namask(); @@ -120,5 +117,5 @@ char *path; /* mount path */ (void) aug_get_machine(clname, buf, &type); aug_save_tid_ex(aug_get_port(), buf, type); (void) aug_audit(); - (void) _mutex_unlock(&audit_mountd_lock); + (void) mutex_unlock(&audit_mountd_lock); } diff --git a/usr/src/lib/libbsm/common/audit_user.c b/usr/src/lib/libbsm/common/audit_user.c index 19d68b1dc5..49c1282879 100644 --- a/usr/src/lib/libbsm/common/audit_user.c +++ b/usr/src/lib/libbsm/common/audit_user.c @@ -18,10 +18,12 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" /* @@ -48,9 +50,6 @@ static mutex_t mutex_userfile = DEFAULTMUTEX; static int use_nsswitch = 1; static au_user_ent_t *auuserstr2ent(au_user_ent_t *, au_user_str_t *); -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - /* * Externs from libnsl */ @@ -64,27 +63,27 @@ extern au_user_str_t *_getauusernam(char *, au_user_str_t *, char *, int, void setauuser() { - _mutex_lock(&mutex_userfile); + (void) mutex_lock(&mutex_userfile); if (use_nsswitch) _setauuser(); else if (au_user_file) { (void) fseek(au_user_file, 0L, 0); } - _mutex_unlock(&mutex_userfile); + (void) mutex_unlock(&mutex_userfile); } void endauuser() { - _mutex_lock(&mutex_userfile); + (void) mutex_lock(&mutex_userfile); if (use_nsswitch) _endauuser(); else if (au_user_file) { (void) fclose(au_user_file); au_user_file = NULL; } - _mutex_unlock(&mutex_userfile); + (void) mutex_unlock(&mutex_userfile); } au_user_ent_t * @@ -107,7 +106,7 @@ getauuserent_r(au_user_ent_t *au_user_entry) char *s, input[256]; - _mutex_lock(&mutex_userfile); + (void) mutex_lock(&mutex_userfile); if (use_nsswitch) { au_user_str_t us; @@ -117,14 +116,14 @@ getauuserent_r(au_user_ent_t *au_user_entry) (void) memset(buf, NULL, NSS_BUFLEN_AUDITUSER); tmp = _getauuserent(&us, buf, NSS_BUFLEN_AUDITUSER, &errp); - _mutex_unlock(&mutex_userfile); + (void) mutex_unlock(&mutex_userfile); return (auuserstr2ent(au_user_entry, tmp)); } /* open audit user file if it isn't already */ if (!au_user_file) if (!(au_user_file = fopen(au_user_fname, "rF"))) { - _mutex_unlock(&mutex_userfile); + (void) mutex_unlock(&mutex_userfile); return (NULL); } @@ -168,7 +167,7 @@ getauuserent_r(au_user_ent_t *au_user_entry) } } - _mutex_unlock(&mutex_userfile); + (void) mutex_unlock(&mutex_userfile); if (!error && found) { return (au_user_entry); diff --git a/usr/src/lib/libbsm/common/getacinfo.c b/usr/src/lib/libbsm/common/getacinfo.c index 65f98d2488..27f2904e29 100644 --- a/usr/src/lib/libbsm/common/getacinfo.c +++ b/usr/src/lib/libbsm/common/getacinfo.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -56,9 +57,6 @@ static int DIRINIT; static FILE *acf; /* pointer into audit control file */ static mutex_t mutex_acf = DEFAULTMUTEX; -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - /* * getacinfo.c - get audit control info * @@ -103,12 +101,12 @@ getacdir(dir, len) /* void setac(); */ /* open file if it is not already opened */ - _mutex_lock(&mutex_acf); + (void) mutex_lock(&mutex_acf); if (acf == NULL && (acf = fopen(AUDIT_CTRL, "rF")) == NULL) retstat = ERROR; else if (LASTOP != DIROP && DIRINIT == 1) { retstat = REW_WARN; - _mutex_unlock(&mutex_acf); + (void) mutex_unlock(&mutex_acf); setac(); } else { DIRINIT = 1; @@ -171,7 +169,7 @@ getacdir(dir, len) } } while (gotone == 0 && retstat >= SUCCESS); - _mutex_unlock(&mutex_acf); + (void) mutex_unlock(&mutex_acf); return (retstat); } @@ -199,7 +197,7 @@ getacmin(min_val) char entry[LEN]; /* open file if it is not already opened */ - _mutex_lock(&mutex_acf); + (void) mutex_lock(&mutex_acf); if (acf == NULL && (acf = fopen(AUDIT_CTRL, "rF")) == NULL) retstat = ERROR; else @@ -247,7 +245,7 @@ getacmin(min_val) DIRINIT = 0; } - _mutex_unlock(&mutex_acf); + (void) mutex_unlock(&mutex_acf); return (retstat); } @@ -277,7 +275,7 @@ getacflg(auditstring, len) char entry[LEN]; /* open file if it is not already opened */ - _mutex_lock(&mutex_acf); + (void) mutex_lock(&mutex_acf); if (acf == NULL && (acf = fopen(AUDIT_CTRL, "rF")) == NULL) retstat = ERROR; else @@ -340,7 +338,7 @@ getacflg(auditstring, len) DIRINIT = 0; } - _mutex_unlock(&mutex_acf); + (void) mutex_unlock(&mutex_acf); return (retstat); } @@ -370,7 +368,7 @@ getacna(auditstring, len) char entry[LEN]; /* open file if it is not already opened */ - _mutex_lock(&mutex_acf); + (void) mutex_lock(&mutex_acf); if (acf == NULL && (acf = fopen(AUDIT_CTRL, "rF")) == NULL) { retstat = ERROR; } else { @@ -439,7 +437,7 @@ getacna(auditstring, len) DIRINIT = 0; } - _mutex_unlock(&mutex_acf); + (void) mutex_unlock(&mutex_acf); return (retstat); } @@ -448,14 +446,14 @@ getacna(auditstring, len) void setac() { - _mutex_lock(&mutex_acf); + (void) mutex_lock(&mutex_acf); if (acf == NULL) acf = fopen(AUDIT_CTRL, "rF"); else rewind(acf); LASTOP = DIROP; DIRINIT = 0; - _mutex_unlock(&mutex_acf); + (void) mutex_unlock(&mutex_acf); } @@ -463,12 +461,12 @@ setac() void endac() { - _mutex_lock(&mutex_acf); + (void) mutex_lock(&mutex_acf); if (acf != NULL) { (void) fclose(acf); acf = NULL; } LASTOP = DIROP; DIRINIT = 0; - _mutex_unlock(&mutex_acf); + (void) mutex_unlock(&mutex_acf); } diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile index 3762e097e0..d2db427b4f 100644 --- a/usr/src/lib/libc/amd64/Makefile +++ b/usr/src/lib/libc/amd64/Makefile @@ -109,10 +109,7 @@ GENOBJS= \ errlst.o \ amd64_data.o \ ldivide.o \ - lexp10.o \ - llog10.o \ lock.o \ - ltostr.o \ makectxt.o \ memccpy.o \ memchr.o \ @@ -452,10 +449,12 @@ PORTGEN= \ l64a.o \ lckpwdf.o \ lconstants.o \ + lexp10.o \ lfind.o \ lfmt.o \ lfmt_log.o \ lldiv.o \ + llog10.o \ lltostr.o \ lmath.o \ localtime.o \ @@ -988,9 +987,6 @@ SRCS= \ $(FPOBJS:%.o=fp/%.c) \ $(I386FPOBJS:%.o=../i386/fp/%.c) \ $(LIBCBASE)/gen/ecvt.c \ - $(LIBCBASE)/gen/lexp10.c \ - $(LIBCBASE)/gen/llog10.c \ - $(LIBCBASE)/gen/ltostr.c \ $(LIBCBASE)/gen/makectxt.c \ $(LIBCBASE)/gen/siginfolst.c \ $(LIBCBASE)/gen/siglongjmp.c \ diff --git a/usr/src/lib/libc/amd64/fp/_base_il.c b/usr/src/lib/libc/amd64/fp/_base_il.c index 5ced00d6cf..da4e3ea506 100644 --- a/usr/src/lib/libc/amd64/fp/_base_il.c +++ b/usr/src/lib/libc/amd64/fp/_base_il.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -/*LINTLIBRARY*/ - -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" #include <sys/isa_defs.h> diff --git a/usr/src/lib/libc/amd64/fp/fpgetmask.c b/usr/src/lib/libc/amd64/fp/fpgetmask.c index c0ac38ffb6..169d911a40 100644 --- a/usr/src/lib/libc/amd64/fp/fpgetmask.c +++ b/usr/src/lib/libc/amd64/fp/fpgetmask.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpgetmask = _fpgetmask +#pragma weak _fpgetmask = fpgetmask -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" diff --git a/usr/src/lib/libc/amd64/fp/fpgetround.c b/usr/src/lib/libc/amd64/fp/fpgetround.c index 4966c4fb0b..19a437f04d 100644 --- a/usr/src/lib/libc/amd64/fp/fpgetround.c +++ b/usr/src/lib/libc/amd64/fp/fpgetround.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpgetround = _fpgetround +#pragma weak _fpgetround = fpgetround -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" diff --git a/usr/src/lib/libc/amd64/fp/fpgetsticky.c b/usr/src/lib/libc/amd64/fp/fpgetsticky.c index c0eb41d6a3..651922b0cc 100644 --- a/usr/src/lib/libc/amd64/fp/fpgetsticky.c +++ b/usr/src/lib/libc/amd64/fp/fpgetsticky.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include <ieeefp.h> -#include "synonyms.h" +#pragma weak _fpgetsticky = fpgetsticky -#pragma weak fpgetsticky = _fpgetsticky +#include "lint.h" +#include <ieeefp.h> extern void _getsw(int *), _getmxcsr(int *); fp_except -_fpgetsticky(void) { +fpgetsticky(void) { int sw, mxcsr; _getsw(&sw); diff --git a/usr/src/lib/libc/amd64/fp/fpsetmask.c b/usr/src/lib/libc/amd64/fp/fpsetmask.c index 36354eb342..b6b7230ae8 100644 --- a/usr/src/lib/libc/amd64/fp/fpsetmask.c +++ b/usr/src/lib/libc/amd64/fp/fpsetmask.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpsetmask = _fpsetmask +#pragma weak _fpsetmask = fpsetmask extern void _getmxcsr(int *), _putmxcsr(int); -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" diff --git a/usr/src/lib/libc/amd64/fp/fpsetround.c b/usr/src/lib/libc/amd64/fp/fpsetround.c index df1d14408c..3312c2d5d8 100644 --- a/usr/src/lib/libc/amd64/fp/fpsetround.c +++ b/usr/src/lib/libc/amd64/fp/fpsetround.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpsetround = _fpsetround +#pragma weak _fpsetround = fpsetround -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" diff --git a/usr/src/lib/libc/amd64/fp/fpsetsticky.c b/usr/src/lib/libc/amd64/fp/fpsetsticky.c index c764dd3075..7092506a5a 100644 --- a/usr/src/lib/libc/amd64/fp/fpsetsticky.c +++ b/usr/src/lib/libc/amd64/fp/fpsetsticky.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" +#include "lint.h" #include <ieeefp.h> -#include "synonyms.h" -#pragma weak fpsetsticky = _fpsetsticky +#pragma weak _fpsetsticky = fpsetsticky extern void _getsw(int *), _putsw(int), _getmxcsr(int *), _putmxcsr(int); fp_except -_fpsetsticky(fp_except s) { +fpsetsticky(fp_except s) { int sw, mxcsr; _getsw(&sw); diff --git a/usr/src/lib/libc/amd64/fp/fpstart.c b/usr/src/lib/libc/amd64/fp/fpstart.c index 7648ced19a..a091d82977 100644 --- a/usr/src/lib/libc/amd64/fp/fpstart.c +++ b/usr/src/lib/libc/amd64/fp/fpstart.c @@ -43,7 +43,7 @@ #pragma weak _fpstart = __fpstart -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/sysi86.h> /* for SI86FPHW/SI86FPSTART definitions */ #include <sys/fp.h> /* for FPU_CW_INIT and SSE_MXCSR_INIT */ diff --git a/usr/src/lib/libc/amd64/gen/abs.s b/usr/src/lib/libc/amd64/gen/abs.s index fe559eb08f..cbbad9e274 100644 --- a/usr/src/lib/libc/amd64/gen/abs.s +++ b/usr/src/lib/libc/amd64/gen/abs.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,11 +20,11 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -39,10 +38,6 @@ * } */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(llabs,function) - #include "SYS.h" ENTRY(abs) diff --git a/usr/src/lib/libc/amd64/gen/ecvt.c b/usr/src/lib/libc/amd64/gen/ecvt.c index 5b135f343c..23e82f8945 100644 --- a/usr/src/lib/libc/amd64/gen/ecvt.c +++ b/usr/src/lib/libc/amd64/gen/ecvt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" /* @@ -38,13 +37,10 @@ * */ -#pragma weak ecvt = _ecvt -#pragma weak fcvt = _fcvt -#pragma weak qecvt = _qecvt -#pragma weak qfcvt = _qfcvt -#pragma weak qgcvt = _qgcvt +#pragma weak _ecvt = ecvt +#pragma weak _fcvt = fcvt -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdlib.h> #include <floatingpoint.h> diff --git a/usr/src/lib/libc/amd64/gen/makectxt.c b/usr/src/lib/libc/amd64/gen/makectxt.c index 1ca4bebd50..5b2ce15313 100644 --- a/usr/src/lib/libc/amd64/gen/makectxt.c +++ b/usr/src/lib/libc/amd64/gen/makectxt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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 makecontext = _makecontext +#pragma weak _makecontext = makecontext -#include "synonyms.h" +#include "lint.h" #include <stdarg.h> #include <ucontext.h> #include <sys/stack.h> @@ -120,6 +119,6 @@ resumecontext(void) { ucontext_t uc; - getcontext(&uc); - setcontext(uc.uc_link); + (void) getcontext(&uc); + (void) setcontext(uc.uc_link); } diff --git a/usr/src/lib/libc/amd64/gen/memccpy.s b/usr/src/lib/libc/amd64/gen/memccpy.s index 2743161583..a3c57d0115 100644 --- a/usr/src/lib/libc/amd64/gen/memccpy.s +++ b/usr/src/lib/libc/amd64/gen/memccpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -32,8 +32,6 @@ ANSI_PRAGMA_WEAK(memccpy,function) -#include "SYS.h" - ENTRY(memccpy) /* (void *dst, void *src, uchar_t c, size_t) */ .loop: decq %rcx / decrement bytes to go diff --git a/usr/src/lib/libc/amd64/gen/memcpy.s b/usr/src/lib/libc/amd64/gen/memcpy.s index 1b77babf0a..7d5dc2f624 100644 --- a/usr/src/lib/libc/amd64/gen/memcpy.s +++ b/usr/src/lib/libc/amd64/gen/memcpy.s @@ -20,6 +20,11 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 2008, Intel Corporation * All rights reserved. */ @@ -28,15 +33,16 @@ * memcpy.s - copies two blocks of memory * Implements memcpy() and memmove() libc primitives. */ - .ident "%Z%%M% %I% %E% SMI" + +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" #include <sys/asm_linkage.h> + ANSI_PRAGMA_WEAK(memmove,function) ANSI_PRAGMA_WEAK(memcpy,function) -#include "synonyms.h" #include "cache.h" #include "proc64_id.h" diff --git a/usr/src/lib/libc/amd64/gen/memset.s b/usr/src/lib/libc/amd64/gen/memset.s index 618fcb874d..754d72910f 100644 --- a/usr/src/lib/libc/amd64/gen/memset.s +++ b/usr/src/lib/libc/amd64/gen/memset.s @@ -20,18 +20,23 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 2008, Intel Corporation * All rights reserved. */ - .ident "%Z%%M% %I% %E% SMI" - .file "%M%" +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" #include <sys/asm_linkage.h> - ANSI_PRAGMA_WEAK(memset,function) + ANSI_PRAGMA_WEAK(memset,function) -#include "synonyms.h" #include "cache.h" #include "proc64_id.h" diff --git a/usr/src/lib/libc/amd64/gen/proc64_support.s b/usr/src/lib/libc/amd64/gen/proc64_support.s index ac2c354aa5..5ac7f046b2 100644 --- a/usr/src/lib/libc/amd64/gen/proc64_support.s +++ b/usr/src/lib/libc/amd64/gen/proc64_support.s @@ -20,6 +20,11 @@ */ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 2008, Intel Corporation * All rights reserved. */ @@ -28,12 +33,12 @@ * Assembler support routines to getcpuid information used to set * cache size information. Cache information used by memset, strcpy, etc.. */ - .ident "%Z%%M% %I% %E% SMI" + +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" #include <sys/asm_linkage.h> -#include "synonyms.h" #include "proc64_id.h" .global .memops_method diff --git a/usr/src/lib/libc/amd64/gen/setjmp.s b/usr/src/lib/libc/amd64/gen/setjmp.s index ab8b79fcec..762a88f3a7 100644 --- a/usr/src/lib/libc/amd64/gen/setjmp.s +++ b/usr/src/lib/libc/amd64/gen/setjmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -54,8 +54,6 @@ ANSI_PRAGMA_WEAK(setjmp,function) ANSI_PRAGMA_WEAK(longjmp,function) -#include "SYS.h" - ENTRY(setjmp) movq %rbx, 0(%rdi) movq %r12, 8(%rdi) diff --git a/usr/src/lib/libc/amd64/gen/siginfolst.c b/usr/src/lib/libc/amd64/gen/siginfolst.c index 28a17bc804..fb2868f22f 100644 --- a/usr/src/lib/libc/amd64/gen/siginfolst.c +++ b/usr/src/lib/libc/amd64/gen/siginfolst.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <signal.h> #include <siginfo.h> diff --git a/usr/src/lib/libc/amd64/gen/siglongjmp.c b/usr/src/lib/libc/amd64/gen/siglongjmp.c index 4bc4c579a4..07a89b485f 100644 --- a/usr/src/lib/libc/amd64/gen/siglongjmp.c +++ b/usr/src/lib/libc/amd64/gen/siglongjmp.c @@ -20,24 +20,22 @@ */ /* - * Copyright 2006 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" -#pragma weak siglongjmp = _siglongjmp +#pragma weak _siglongjmp = siglongjmp -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/ucontext.h> #include <setjmp.h> #include <ucontext.h> -extern int _setcontext(const ucontext_t *); - void -_siglongjmp(sigjmp_buf env, int val) +siglongjmp(sigjmp_buf env, int val) { /* LINTED alignment */ ucontext_t *ucp = (ucontext_t *)env; @@ -47,5 +45,5 @@ _siglongjmp(sigjmp_buf env, int val) else ucp->uc_mcontext.gregs[REG_R0] = 1; - (void) _setcontext(ucp); + (void) setcontext(ucp); } diff --git a/usr/src/lib/libc/amd64/gen/wschr.s b/usr/src/lib/libc/amd64/gen/wschr.s index ced5362101..eb80866bf2 100644 --- a/usr/src/lib/libc/amd64/gen/wschr.s +++ b/usr/src/lib/libc/amd64/gen/wschr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -33,19 +33,15 @@ / / Algorithm based on Solaris 2.6 gen/strchr.s implementation / -/ .ident "@(#)strchr.s 1.1 92/04/17 SMI" -/ #include <sys/asm_linkage.h> ANSI_PRAGMA_WEAK(wcschr,function) ANSI_PRAGMA_WEAK(wschr,function) -#include "SYS.h" - .align 8 / accounts for .loop alignment and prolog - ENTRY(_wcschr) /* (wchar_t *s, wchar_t wc) */ + ENTRY(wcschr) /* (wchar_t *s, wchar_t wc) */ movq %rdi,%rax .loop: movl (%rax),%edx / %edx = wchar of string @@ -87,8 +83,8 @@ addq $4,%rax .found: ret - SET_SIZE(_wcschr) + SET_SIZE(wcschr) - ENTRY(_wschr) - jmp _wcschr / tail call into _wcschr - SET_SIZE(_wschr) + ENTRY(wschr) + jmp wcschr / tail call into wcschr + SET_SIZE(wschr) diff --git a/usr/src/lib/libc/amd64/gen/wslen.s b/usr/src/lib/libc/amd64/gen/wslen.s index f27d0ba675..155191a997 100644 --- a/usr/src/lib/libc/amd64/gen/wslen.s +++ b/usr/src/lib/libc/amd64/gen/wslen.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -32,7 +32,7 @@ * Wide character wcslen() implementation * * size_t - * _wcslen(const wchar_t *s) + * wcslen(const wchar_t *s) *{ * const wchar_t *s0 = s + 1; * while (*s++) @@ -46,9 +46,7 @@ ANSI_PRAGMA_WEAK(wcslen,function) ANSI_PRAGMA_WEAK(wslen,function) -#include "SYS.h" - - ENTRY(_wcslen) /* (wchar_t *) */ + ENTRY(wcslen) /* (wchar_t *) */ xorl %eax,%eax .align 8 @@ -80,8 +78,8 @@ .out3: addq $3, %rax ret - SET_SIZE(_wcslen) + SET_SIZE(wcslen) - ENTRY(_wslen) - jmp _wcslen / tail call into _wcslen - SET_SIZE(_wslen) + ENTRY(wslen) + jmp wcslen / tail call into wcslen + SET_SIZE(wslen) diff --git a/usr/src/lib/libc/amd64/gen/wsncmp.s b/usr/src/lib/libc/amd64/gen/wsncmp.s index b1e8fd91ff..7697cac3b7 100644 --- a/usr/src/lib/libc/amd64/gen/wsncmp.s +++ b/usr/src/lib/libc/amd64/gen/wsncmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -33,17 +33,13 @@ / / Algorithm based on Solaris 2.6 gen/strncpy.s implementation / -/ .ident "@(#)strncpy.s 1.1 92/04/17 SMI" -/ #include <sys/asm_linkage.h> ANSI_PRAGMA_WEAK(wcsncmp,function) ANSI_PRAGMA_WEAK(wsncmp,function) -#include "SYS.h" - - ENTRY(_wcsncmp) /* (wchar *ws1, wchar_t *ws2, size_t n) */ + ENTRY(wcsncmp) /* (wchar *ws1, wchar_t *ws2, size_t n) */ cmpq %rdi,%rsi / same string? je .equal incq %rdx / will later predecrement this uint @@ -96,8 +92,8 @@ .notequal_0: subl (%rsi),%eax / return value is (*s1 - *--s2) ret - SET_SIZE(_wcsncmp) + SET_SIZE(wcsncmp) - ENTRY(_wsncmp) - jmp _wcsncmp / tail call into _wcsncmp - SET_SIZE(_wsncmp) + ENTRY(wsncmp) + jmp wcsncmp / tail call into wcsncmp + SET_SIZE(wsncmp) diff --git a/usr/src/lib/libc/amd64/inc/SYS.h b/usr/src/lib/libc/amd64/inc/SYS.h index 3c45d609a8..e3b1e09bb3 100644 --- a/usr/src/lib/libc/amd64/inc/SYS.h +++ b/usr/src/lib/libc/amd64/inc/SYS.h @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,15 +35,6 @@ #include <sys/asm_linkage.h> #include <sys/syscall.h> #include <sys/errno.h> -#include "synonyms.h" - -#undef syscall /* override synonyms.h */ - -/* - * XX64 -- the SOS9 assembler doesn't recognize the 'syscall' instruction yet. - * We compensate by defining the byte sequence here. - */ -#define syscall .byte 0xf, 0x5 #define _fref_(name) name@PLT #define _daref_(name) name@GOTPCREL(%rip) diff --git a/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s b/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s index bb8723a8ae..e89a141fa4 100644 --- a/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s +++ b/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s @@ -28,10 +28,6 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(_lwp_mutex_unlock,function) - #include "SYS.h" #include <../assym.h> diff --git a/usr/src/lib/libc/amd64/sys/door.s b/usr/src/lib/libc/amd64/sys/door.s index 381e14b503..fc32051198 100644 --- a/usr/src/lib/libc/amd64/sys/door.s +++ b/usr/src/lib/libc/amd64/sys/door.s @@ -28,27 +28,18 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" +#include <sys/door.h> /* * weak aliases for public interfaces */ - ANSI_PRAGMA_WEAK(_door_bind,function) - ANSI_PRAGMA_WEAK(_door_getparam,function) - ANSI_PRAGMA_WEAK(_door_info,function) - ANSI_PRAGMA_WEAK(_door_revoke,function) - ANSI_PRAGMA_WEAK(_door_setparam,function) - ANSI_PRAGMA_WEAK(_door_unbind,function) - - ANSI_PRAGMA_WEAK(door_bind,function) - ANSI_PRAGMA_WEAK(door_getparam,function) - ANSI_PRAGMA_WEAK(door_info,function) - ANSI_PRAGMA_WEAK(door_revoke,function) - ANSI_PRAGMA_WEAK(door_setparam,function) - ANSI_PRAGMA_WEAK(door_unbind,function) - -#include <sys/door.h> -#include "SYS.h" + ANSI_PRAGMA_WEAK2(door_bind,__door_bind,function) + ANSI_PRAGMA_WEAK2(door_getparam,__door_getparam,function) + ANSI_PRAGMA_WEAK2(door_info,__door_info,function) + ANSI_PRAGMA_WEAK2(door_revoke,__door_revoke,function) + ANSI_PRAGMA_WEAK2(door_setparam,__door_setparam,function) + ANSI_PRAGMA_WEAK2(door_unbind,__door_unbind,function) /* * Offsets within struct door_results @@ -127,7 +118,7 @@ door_restart: call *%rax /* Exit the thread if we return here */ movq $0, %rdi - call _thr_terminate + call _thrp_terminate /* NOTREACHED */ 2: /* diff --git a/usr/src/lib/libc/amd64/sys/gettimeofday.s b/usr/src/lib/libc/amd64/sys/gettimeofday.s index 0693fd8161..9dfd958292 100644 --- a/usr/src/lib/libc/amd64/sys/gettimeofday.s +++ b/usr/src/lib/libc/amd64/sys/gettimeofday.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,19 +28,17 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(gettimeofday,function) -#include "SYS.h" - /* * implements int gettimeofday(struct timeval *tp, void *tzp) * * note that tzp is always ignored */ - ENTRY(_gettimeofday) + ENTRY(gettimeofday) /* * use long long gethrestime() */ @@ -60,5 +58,5 @@ movq %rdx, 8(%rcx) /* store usecs into timeval ptr + 8. */ 1: RETC /* return 0 */ - SET_SIZE(_gettimeofday) + SET_SIZE(gettimeofday) diff --git a/usr/src/lib/libc/amd64/sys/lwp_private.s b/usr/src/lib/libc/amd64/sys/lwp_private.s index d6f0f0621a..757dd83209 100644 --- a/usr/src/lib/libc/amd64/sys/lwp_private.s +++ b/usr/src/lib/libc/amd64/sys/lwp_private.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - .file "lwp_private.s" - -#include <sys/asm_linkage.h> + .file "%M%" #include "SYS.h" /* * int - * __lwp_setprivate(int cmd, int which, void *base) + * ___lwp_private(int cmd, int which, void *base) */ ENTRY(___lwp_private) SYSTRAP_RVAL1(lwp_private) diff --git a/usr/src/lib/libc/amd64/sys/syscall.s b/usr/src/lib/libc/amd64/sys/syscall.s index 1eb1627751..d93ca204b6 100644 --- a/usr/src/lib/libc/amd64/sys/syscall.s +++ b/usr/src/lib/libc/amd64/sys/syscall.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,16 +28,11 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(syscall,function) - #include "SYS.h" -#undef _syscall /* override "synonyms.h" */ -#undef __systemcall + ANSI_PRAGMA_WEAK(syscall,function) - ENTRY(_syscall) + ENTRY(syscall) pushq %rbp movq %rsp, %rbp /* construct a new call stack frame */ @@ -61,7 +56,7 @@ leave SYSCERROR ret - SET_SIZE(_syscall) + SET_SIZE(syscall) /* * Same as _syscall(), but restricted to 6 syscall arguments diff --git a/usr/src/lib/libc/amd64/sys/sysi86.s b/usr/src/lib/libc/amd64/sys/sysi86.s index 14e47db53c..bb1edbfd2a 100644 --- a/usr/src/lib/libc/amd64/sys/sysi86.s +++ b/usr/src/lib/libc/amd64/sys/sysi86.s @@ -28,14 +28,10 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(sysi86,function) -#include "SYS.h" - - ENTRY(_sysi86) - SYSTRAP_RVAL1(sysi86) - SYSCERROR + SYSCALL_RVAL1(sysi86) RET - SET_SIZE(_sysi86) + SET_SIZE(sysi86) diff --git a/usr/src/lib/libc/amd64/sys/uadmin.c b/usr/src/lib/libc/amd64/sys/uadmin.c index 8caf6d5bc3..bc15f4a9e3 100644 --- a/usr/src/lib/libc/amd64/sys/uadmin.c +++ b/usr/src/lib/libc/amd64/sys/uadmin.c @@ -26,8 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak uadmin = _uadmin - /* * Wrapper function to implement reboot w/ arguments on x86 * platforms. Extract reboot arguments and place them in @@ -35,7 +33,7 @@ * All other commands are passed through. */ -#include "synonyms.h" +#include "lint.h" #include <fcntl.h> #include <ctype.h> #include <stdio.h> diff --git a/usr/src/lib/libc/amd64/sys/vforkx.s b/usr/src/lib/libc/amd64/sys/vforkx.s index 507518572b..741cf593c7 100644 --- a/usr/src/lib/libc/amd64/sys/vforkx.s +++ b/usr/src/lib/libc/amd64/sys/vforkx.s @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,11 +28,6 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(vforkx,function) - ANSI_PRAGMA_WEAK(vfork,function) - #include "SYS.h" #include <assym.h> diff --git a/usr/src/lib/libc/amd64/threads/asm_subr.s b/usr/src/lib/libc/amd64/threads/asm_subr.s index 181b7b050e..fc724a0bfc 100644 --- a/usr/src/lib/libc/amd64/threads/asm_subr.s +++ b/usr/src/lib/libc/amd64/threads/asm_subr.s @@ -35,11 +35,11 @@ /* * This is where execution resumes when a thread created with * thr_create() or pthread_create() returns (see setup_context()). - * We pass the (void *) return value to _thr_terminate(). + * We pass the (void *) return value to _thrp_terminate(). */ ENTRY(_lwp_start) movq %rax, %rdi - call _thr_terminate + call _thrp_terminate RET /* actually, never returns */ SET_SIZE(_lwp_start) diff --git a/usr/src/lib/libc/amd64/threads/machdep.c b/usr/src/lib/libc/amd64/threads/machdep.c index b9b186398e..844490fabb 100644 --- a/usr/src/lib/libc/amd64/threads/machdep.c +++ b/usr/src/lib/libc/amd64/threads/machdep.c @@ -73,7 +73,7 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *), * Machine-dependent startup code for a newly-created thread. */ void * -_thr_setup(ulwp_t *self) +_thrp_setup(ulwp_t *self) { self->ul_ustack.ss_sp = (void *)(self->ul_stktop - self->ul_stksiz); self->ul_ustack.ss_size = self->ul_stksiz; diff --git a/usr/src/lib/libc/amd64/unwind/call_frame_inst.c b/usr/src/lib/libc/amd64/unwind/call_frame_inst.c index 70f6ebab46..f803556066 100644 --- a/usr/src/lib/libc/amd64/unwind/call_frame_inst.c +++ b/usr/src/lib/libc/amd64/unwind/call_frame_inst.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,7 +31,7 @@ */ #ifndef _LIBCRUN_ -#include "synonyms.h" +#include "lint.h" #endif #include <sys/types.h> #include "stack_unwind.h" @@ -144,19 +144,19 @@ fix_cfa(struct _Unwind_Context *ctx, struct register_state *rs) { switch (rs[CF_ADDR].rule) { default: - ctx->cfa = 0; + ctx->cfa = 0; break; case register_rule: /* CFA = offset + source_reg */ ctx->cfa = (ctx->current_regs)[rs[CF_ADDR].source_reg] + - rs[CF_ADDR].offset; + rs[CF_ADDR].offset; break; case constant_rule: /* CFA = offset */ ctx->cfa = rs[CF_ADDR].offset; break; case indirect_rule: /* CFA = *(offset + source_reg) */ ctx->cfa = *(uint64_t *) - (ctx->current_regs[rs[CF_ADDR].source_reg] + - rs[CF_ADDR].offset); + (ctx->current_regs[rs[CF_ADDR].source_reg] + + rs[CF_ADDR].offset); break; } ctx->entry_regs[SP_RSP] = ctx->cfa; @@ -168,19 +168,19 @@ fix_ra(struct _Unwind_Context *ctx, struct register_state *rs) switch (rs[RET_ADD].rule) { case undefined_rule: default: - ctx->ra = 0; + ctx->ra = 0; break; case offset_rule: /* RA = *(offset + CFA) */ ctx->ra = *(uint64_t *)(ctx->cfa + rs[RET_ADD].offset); break; case register_rule: /* RA = offset + source_reg */ ctx->ra = ctx->current_regs[rs[RET_ADD].source_reg] + - rs[RET_ADD].offset; + rs[RET_ADD].offset; break; case indirect_rule: /* RA = *(offset + source_reg) */ ctx->ra = *(uint64_t *) - (ctx->current_regs[rs[RET_ADD].source_reg] + - rs[RET_ADD].offset); + (ctx->current_regs[rs[RET_ADD].source_reg] + + rs[RET_ADD].offset); break; } } @@ -194,23 +194,23 @@ fix_reg(struct _Unwind_Context *ctx, struct register_state *rs, int index) break; case offset_rule: /* target_reg = *(offset + CFA) */ ctx->entry_regs[index] = *(uint64_t *) - (ctx->cfa + rs[index].offset); + (ctx->cfa + rs[index].offset); break; case is_offset_rule: /* target_reg = offset + CFA */ ctx->entry_regs[index] = ctx->cfa + rs[index].offset; break; case register_rule: /* target_reg = offset + source_reg */ ctx->entry_regs[index] = - ctx->current_regs[rs[index].source_reg] + - rs[index].offset; + ctx->current_regs[rs[index].source_reg] + + rs[index].offset; break; case constant_rule: /* target_reg = offset */ ctx->entry_regs[index] = rs[index].offset; break; case indirect_rule: /* target_reg = *(offset + source_reg) */ ctx->entry_regs[index] = *(uint64_t *) - (ctx->current_regs[rs[index].source_reg] + - rs[index].offset); + (ctx->current_regs[rs[index].source_reg] + + rs[index].offset); break; } } @@ -249,7 +249,7 @@ _Unw_Rollback_Registers(struct eh_frame_fields *f, return (0); } ctx->entry_regs[FP_RBP] = ((uint64_t *) - (ctx->current_regs[FP_RBP]))[0]; + (ctx->current_regs[FP_RBP]))[0]; ctx->cfa = ctx->current_regs[FP_RBP] + 16; ctx->entry_regs[SP_RSP] = ctx->cfa; ctx->entry_regs[GPR_RBX] = ctx->current_regs[GPR_RBX]; @@ -264,13 +264,13 @@ _Unw_Rollback_Registers(struct eh_frame_fields *f, for (i = 0; i < 18; i++) func_start_state[i] = nop; first_pc = interpret_ops(f->cie_ops, f->cie_ops_end, - f->cie_reloc, ctx->func, ctx->pc, func_start_state, 0, - f->data_align, f->code_align, f->code_enc); + f->cie_reloc, ctx->func, ctx->pc, func_start_state, 0, + f->data_align, f->code_align, f->code_enc); for (i = 0; i < 18; i++) func_state[i] = func_start_state[i]; (void) interpret_ops(f->fde_ops, f->fde_ops_end, - f->fde_reloc, first_pc, ctx->pc, func_state, func_start_state, - f->data_align, f->code_align, f->code_enc); + f->fde_reloc, first_pc, ctx->pc, func_state, func_start_state, + f->data_align, f->code_align, f->code_enc); fix_cfa(ctx, func_state); if (ctx->cfa < ctx->current_regs[SP_RSP]) { diff --git a/usr/src/lib/libc/amd64/unwind/eh_frame.c b/usr/src/lib/libc/amd64/unwind/eh_frame.c index 8e3490b318..b4dcad7b24 100644 --- a/usr/src/lib/libc/amd64/unwind/eh_frame.c +++ b/usr/src/lib/libc/amd64/unwind/eh_frame.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,7 +31,7 @@ */ #ifndef _LIBCRUN_ -#include "synonyms.h" +#include "lint.h" #endif #include <sys/types.h> #include <limits.h> @@ -92,13 +92,13 @@ _Unw_Decode_FDE(struct eh_frame_fields *f, struct _Unwind_Context *ctx) fde_data = ctx->fde; data = fde_data; fde_end = (void *)(((intptr_t)fde_data) + 4 + - _Unw_get_val(&data, 0, UNUM32, 1, 1, 0)); + _Unw_get_val(&data, 0, UNUM32, 1, 1, 0)); reloc = 0; base = ((intptr_t)data) + reloc; cie_data = (void *)(base - _Unw_get_val(&data, 0, UNUM32, 1, 1, 0)); cdata = cie_data; cie_end = (void *)(((intptr_t)cie_data) + 4 + - _Unw_get_val(&cdata, 0, UNUM32, 1, 1, 0)); + _Unw_get_val(&cdata, 0, UNUM32, 1, 1, 0)); creloc = 0; /* data mapping has happened */ @@ -111,7 +111,7 @@ _Unw_Decode_FDE(struct eh_frame_fields *f, struct _Unwind_Context *ctx) (void) _Unw_get_val(&cdata, creloc, UNUM8, 1, 1, 0); /* LINTED alignment */ (*((uint64_t *)(&(augment[0])))) = - _Unw_get_val(&cdata, creloc, ZTSTRING, 1, 1, 0); + _Unw_get_val(&cdata, creloc, ZTSTRING, 1, 1, 0); f->code_align = _Unw_get_val(&cdata, creloc, ULEB128, 1, 1, 0); f->data_align = _Unw_get_val(&cdata, creloc, SLEB128, 1, 1, 0); (void) _Unw_get_val(&cdata, creloc, UNUM8, 1, 1, 0); @@ -371,7 +371,7 @@ locate_fde_for_pc(uint64_t pc, int enc, pi + (((pj - pi) >> (log_size + 1)) << log_size); /* Don't use (pi+pj)>>1 */ get_table_ent_val(pr, table_end, enc, reloc, base, - &range_start, &range_end, &fde); + &range_start, &range_end, &fde); /* Return fde if tpc is in this range. */ diff --git a/usr/src/lib/libc/amd64/unwind/thrp_unwind.c b/usr/src/lib/libc/amd64/unwind/thrp_unwind.c index 365cbf77be..648a93894d 100644 --- a/usr/src/lib/libc/amd64/unwind/thrp_unwind.c +++ b/usr/src/lib/libc/amd64/unwind/thrp_unwind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include "stack_unwind.h" #include "reg_num.h" diff --git a/usr/src/lib/libc/amd64/unwind/unwind.c b/usr/src/lib/libc/amd64/unwind/unwind.c index 1fb774a28e..788d7b2d68 100644 --- a/usr/src/lib/libc/amd64/unwind/unwind.c +++ b/usr/src/lib/libc/amd64/unwind/unwind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -131,22 +130,21 @@ #define _Unwind_SetGR _SUNW_Unwind_SetGR #define _Unwind_SetIP _SUNW_Unwind_SetIP #else -#pragma weak _Unwind_DeleteException = _SUNW_Unwind_DeleteException -#pragma weak _Unwind_ForcedUnwind = _SUNW_Unwind_ForcedUnwind -#pragma weak _Unwind_GetCFA = _SUNW_Unwind_GetCFA -#pragma weak _Unwind_GetGR = _SUNW_Unwind_GetGR -#pragma weak _Unwind_GetIP = _SUNW_Unwind_GetIP -#pragma weak _Unwind_GetLanguageSpecificData = \ - _SUNW_Unwind_GetLanguageSpecificData -#pragma weak _Unwind_GetRegionStart = _SUNW_Unwind_GetRegionStart -#pragma weak _Unwind_RaiseException = _SUNW_Unwind_RaiseException -#pragma weak _Unwind_Resume = _SUNW_Unwind_Resume -#pragma weak _Unwind_SetGR = _SUNW_Unwind_SetGR -#pragma weak _Unwind_SetIP = _SUNW_Unwind_SetIP - -#include "synonyms.h" +#pragma weak _SUNW_Unwind_DeleteException = _Unwind_DeleteException +#pragma weak _SUNW_Unwind_ForcedUnwind = _Unwind_ForcedUnwind +#pragma weak _SUNW_Unwind_GetCFA = _Unwind_GetCFA +#pragma weak _SUNW_Unwind_GetGR = _Unwind_GetGR +#pragma weak _SUNW_Unwind_GetIP = _Unwind_GetIP +#pragma weak _SUNW_Unwind_GetLanguageSpecificData = \ + _Unwind_GetLanguageSpecificData +#pragma weak _SUNW_Unwind_GetRegionStart = _Unwind_GetRegionStart +#pragma weak _SUNW_Unwind_RaiseException = _Unwind_RaiseException +#pragma weak _SUNW_Unwind_Resume = _Unwind_Resume +#pragma weak _SUNW_Unwind_SetGR = _Unwind_SetGR +#pragma weak _SUNW_Unwind_SetIP = _Unwind_SetIP #endif +#include "lint.h" #include <string.h> #include "stack_unwind.h" #include "reg_num.h" @@ -376,7 +374,7 @@ _Unwind_ForcedUnwind_Body(struct _Unwind_Exception *exception_object, finish_capture(ctx, resume); if (resume && down_one(ctx, ctx)) - return (_URC_FATAL_PHASE2_ERROR); + return (_URC_FATAL_PHASE2_ERROR); do { again = 0; @@ -418,8 +416,8 @@ _Unwind_ForcedUnwind_Body(struct _Unwind_Exception *exception_object, case _URC_END_OF_STACK: ctx->cfa = ctx->ra = ctx->pc = 0; res = (*stop)(1, phase, - exception_object->exception_class, - exception_object, ctx, stop_parameter); + exception_object->exception_class, + exception_object, ctx, stop_parameter); return (_URC_END_OF_STACK); break; default: diff --git a/usr/src/lib/libc/common/sys/_lgrp_home_fast.s b/usr/src/lib/libc/common/sys/_lgrp_home_fast.s index a88268810a..7347d994c1 100644 --- a/usr/src/lib/libc/common/sys/_lgrp_home_fast.s +++ b/usr/src/lib/libc/common/sys/_lgrp_home_fast.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - .file "%M%" + .file "%M%" /* * C library -- gethomelgroup @@ -34,12 +34,10 @@ * lgrp_id_t _lgrp_home_fast() */ -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(gethomelgroup,function) -#include "SYS.h" - /* * lgrp_id_t _lgrp_home_fast(void) * lgrpid_t gethomelgroup(void) @@ -48,8 +46,8 @@ * XXX gethomelgroup() being replaced by lgrp_home() XXX */ - ENTRY2(_lgrp_home_fast,_gethomelgroup) + ENTRY2(_lgrp_home_fast,gethomelgroup) SYSFASTTRAP(GETLGRP) /* share fast trap with getcpuid */ RET2 /* return rval2 */ SET_SIZE(_lgrp_home_fast) - SET_SIZE(_gethomelgroup) + SET_SIZE(gethomelgroup) diff --git a/usr/src/lib/libc/common/sys/acl.s b/usr/src/lib/libc/common/sys/acl.s index 64f697e881..3a3fb614c5 100644 --- a/usr/src/lib/libc/common/sys/acl.s +++ b/usr/src/lib/libc/common/sys/acl.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- acl */ /* int acl(const char *path, int cmd, int cnt, struct aclent *buf) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(acl,function) - #include "SYS.h" SYSCALL_RVAL1(acl) diff --git a/usr/src/lib/libc/common/sys/adjtime.s b/usr/src/lib/libc/common/sys/adjtime.s index 8c103ee2ae..bede3400cb 100644 --- a/usr/src/lib/libc/common/sys/adjtime.s +++ b/usr/src/lib/libc/common/sys/adjtime.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C Library -- adjtime */ /* int adjtime(struct timeval *delta, struct timeval *olddelta) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(adjtime,function) - #include "SYS.h" SYSCALL_RVAL1(adjtime) diff --git a/usr/src/lib/libc/common/sys/cladm.s b/usr/src/lib/libc/common/sys/cladm.s index 17d74041a3..491d849643 100644 --- a/usr/src/lib/libc/common/sys/cladm.s +++ b/usr/src/lib/libc/common/sys/cladm.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,10 +28,6 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(_cladm,function) - #include "SYS.h" /* diff --git a/usr/src/lib/libc/common/sys/facl.s b/usr/src/lib/libc/common/sys/facl.s index ebccb91f78..2cd5cd103a 100644 --- a/usr/src/lib/libc/common/sys/facl.s +++ b/usr/src/lib/libc/common/sys/facl.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- facl */ /* int facl(int fd, int cmd, int cnt, struct aclent *buf) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(facl,function) - #include "SYS.h" SYSCALL_RVAL1(facl) diff --git a/usr/src/lib/libc/common/sys/fchroot.s b/usr/src/lib/libc/common/sys/fchroot.s index b541215132..404169e225 100644 --- a/usr/src/lib/libc/common/sys/fchroot.s +++ b/usr/src/lib/libc/common/sys/fchroot.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- fchroot */ /* int fchroot(const int fd) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(fchroot,function) - #include "SYS.h" SYSCALL_RVAL1(fchroot) diff --git a/usr/src/lib/libc/common/sys/fstatfs.s b/usr/src/lib/libc/common/sys/fstatfs.s index 271bf07e4d..51be44dddb 100644 --- a/usr/src/lib/libc/common/sys/fstatfs.s +++ b/usr/src/lib/libc/common/sys/fstatfs.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -36,10 +35,6 @@ /* int fstatfs(int fildes, struct statfs *buf, int len, int fstyp) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(fstatfs,function) - #include "SYS.h" SYSCALL_RVAL1(fstatfs) diff --git a/usr/src/lib/libc/common/sys/getcpuid.s b/usr/src/lib/libc/common/sys/getcpuid.s index 62749efccd..3bfa8f7728 100644 --- a/usr/src/lib/libc/common/sys/getcpuid.s +++ b/usr/src/lib/libc/common/sys/getcpuid.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,32 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - .file "%M%" + .file "%M%" /* * C library -- getcpuid * processorid_t getcpuid() */ -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(getcpuid,function) -#include "SYS.h" - /* * processorid_t getcpuid(void) * * Returns the cpu id */ - ENTRY(_getcpuid) + ENTRY(getcpuid) SYSFASTTRAP(GETLGRP) /* share fast trap with _lgrp_home_fast() */ RET /* return rval1 */ - SET_SIZE(_getcpuid) + SET_SIZE(getcpuid) diff --git a/usr/src/lib/libc/common/sys/gtty.s b/usr/src/lib/libc/common/sys/gtty.s index a1af420723..363533a953 100644 --- a/usr/src/lib/libc/common/sys/gtty.s +++ b/usr/src/lib/libc/common/sys/gtty.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- gtty */ /* int gtty (int fildes, int arg); */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(gtty,function) - #include "SYS.h" SYSCALL_RVAL1(gtty) diff --git a/usr/src/lib/libc/common/sys/link.s b/usr/src/lib/libc/common/sys/link.s index 290daa3a6a..6ec6e69686 100644 --- a/usr/src/lib/libc/common/sys/link.s +++ b/usr/src/lib/libc/common/sys/link.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,8 +34,6 @@ /* C library -- link */ /* int link (const char *path1, const char *path2); */ -#include <sys/asm_linkage.h> - #include "SYS.h" SYSCALL2_RVAL1(__link,link) diff --git a/usr/src/lib/libc/common/sys/mincore.s b/usr/src/lib/libc/common/sys/mincore.s index 7f2cc90b8f..8819a652bd 100644 --- a/usr/src/lib/libc/common/sys/mincore.s +++ b/usr/src/lib/libc/common/sys/mincore.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- mincore */ /* int mincore(caddr_t addr, size_t len, char *vec) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(mincore,function) - #include "SYS.h" SYSCALL_RVAL1(mincore) diff --git a/usr/src/lib/libc/common/sys/pollsys.s b/usr/src/lib/libc/common/sys/pollsys.s index 4294f73a50..295e437d5f 100644 --- a/usr/src/lib/libc/common/sys/pollsys.s +++ b/usr/src/lib/libc/common/sys/pollsys.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -38,7 +37,6 @@ timespec_t *timeout, sigset_t *sigmask); */ -#include <sys/asm_linkage.h> #include "SYS.h" SYSCALL2_RVAL1(__pollsys,pollsys) diff --git a/usr/src/lib/libc/common/sys/seteguid.s b/usr/src/lib/libc/common/sys/seteguid.s index cfc6991dc3..c370446587 100644 --- a/usr/src/lib/libc/common/sys/seteguid.s +++ b/usr/src/lib/libc/common/sys/seteguid.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,11 +34,6 @@ /* C library -- setegid, seteuid */ /* int setegid (gid_t gid) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(setegid,function) - ANSI_PRAGMA_WEAK(seteuid,function) - #include "SYS.h" SYSCALL_RVAL1(setegid) diff --git a/usr/src/lib/libc/common/sys/statfs.s b/usr/src/lib/libc/common/sys/statfs.s index 4010e364d6..aee5c59b2d 100644 --- a/usr/src/lib/libc/common/sys/statfs.s +++ b/usr/src/lib/libc/common/sys/statfs.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -36,10 +35,6 @@ /* int statfs (const char *path, struct statfs *buf, int len, */ /* int fstyp); */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(statfs,function) - #include "SYS.h" SYSCALL_RVAL1(statfs) diff --git a/usr/src/lib/libc/common/sys/stty.s b/usr/src/lib/libc/common/sys/stty.s index f020360c64..0350573531 100644 --- a/usr/src/lib/libc/common/sys/stty.s +++ b/usr/src/lib/libc/common/sys/stty.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- stty */ /* int stty (char *path, struct ?? buf, int len); */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(stty,function) - #include "SYS.h" SYSCALL_RVAL1(stty) diff --git a/usr/src/lib/libc/common/sys/syslwp.s b/usr/src/lib/libc/common/sys/syslwp.s index fda8f2625a..7034c709f9 100644 --- a/usr/src/lib/libc/common/sys/syslwp.s +++ b/usr/src/lib/libc/common/sys/syslwp.s @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,17 +28,6 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(_lwp_continue,function) - ANSI_PRAGMA_WEAK(_lwp_kill,function) - ANSI_PRAGMA_WEAK(_lwp_self,function) - ANSI_PRAGMA_WEAK(_lwp_cond_broadcast,function) - ANSI_PRAGMA_WEAK(_lwp_cond_signal,function) - ANSI_PRAGMA_WEAK(_lwp_sema_trywait,function) - ANSI_PRAGMA_WEAK(_lwp_sema_post,function) - ANSI_PRAGMA_WEAK(_lwp_info,function) - #include "SYS.h" /* @@ -53,13 +42,13 @@ /* * int - * __lwp_continue(lwpid_t lwpid) + * _lwp_continue(lwpid_t lwpid) */ - ENTRY(__lwp_continue) + ENTRY(_lwp_continue) SYSTRAP_RVAL1(lwp_continue) SYSLWPERR RET - SET_SIZE(__lwp_continue) + SET_SIZE(_lwp_continue) /* * int @@ -73,22 +62,22 @@ /* * int - * __lwp_kill(lwpid_t lwpid, int sig) + * _lwp_kill(lwpid_t lwpid, int sig) */ - ENTRY(__lwp_kill) + ENTRY(_lwp_kill) SYSTRAP_RVAL1(lwp_kill) SYSLWPERR RET - SET_SIZE(__lwp_kill) + SET_SIZE(_lwp_kill) /* * lwpid_t - * __lwp_self(void) + * _lwp_self(void) */ - ENTRY(__lwp_self) + ENTRY(_lwp_self) SYSTRAP_RVAL1(lwp_self) RET - SET_SIZE(__lwp_self) + SET_SIZE(_lwp_self) /* * int @@ -140,13 +129,13 @@ /* * int - * __lwp_cond_broadcast(lwp_cond_t *cvp) + * _lwp_cond_broadcast(lwp_cond_t *cvp) */ - ENTRY(__lwp_cond_broadcast) + ENTRY(_lwp_cond_broadcast) SYSTRAP_RVAL1(lwp_cond_broadcast) SYSLWPERR RET - SET_SIZE(__lwp_cond_broadcast) + SET_SIZE(_lwp_cond_broadcast) /* * int @@ -160,13 +149,13 @@ /* * int - * __lwp_cond_signal(lwp_cond_t *cvp) + * _lwp_cond_signal(lwp_cond_t *cvp) */ - ENTRY(__lwp_cond_signal) + ENTRY(_lwp_cond_signal) SYSTRAP_RVAL1(lwp_cond_signal) SYSLWPERR RET - SET_SIZE(__lwp_cond_signal) + SET_SIZE(_lwp_cond_signal) /* * int @@ -180,33 +169,33 @@ /* * int - * __lwp_sema_trywait(lwp_sema_t *sp) + * _lwp_sema_trywait(lwp_sema_t *sp) */ - ENTRY(__lwp_sema_trywait) + ENTRY(_lwp_sema_trywait) SYSTRAP_RVAL1(lwp_sema_trywait) SYSLWPERR RET - SET_SIZE(__lwp_sema_trywait) + SET_SIZE(_lwp_sema_trywait) /* * int - * __lwp_sema_post(lwp_sema_t *sp) + * _lwp_sema_post(lwp_sema_t *sp) */ - ENTRY(__lwp_sema_post) + ENTRY(_lwp_sema_post) SYSTRAP_RVAL1(lwp_sema_post) SYSLWPERR RET - SET_SIZE(__lwp_sema_post) + SET_SIZE(_lwp_sema_post) /* * int - * __lwp_info(struct lwpinfo *infop) + * _lwp_info(struct lwpinfo *infop) */ - ENTRY(__lwp_info) + ENTRY(_lwp_info) SYSTRAP_RVAL1(lwp_info) SYSLWPERR RET - SET_SIZE(__lwp_info) + SET_SIZE(_lwp_info) /* * sc_shared_t * diff --git a/usr/src/lib/libc/common/sys/utimes.s b/usr/src/lib/libc/common/sys/utimes.s index dc0cb1fbd6..4479682770 100644 --- a/usr/src/lib/libc/common/sys/utimes.s +++ b/usr/src/lib/libc/common/sys/utimes.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- utimes */ /* int utimes (const char *path, const struct timeval *times); */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(utimes,function) - #include "SYS.h" SYSCALL_RVAL1(utimes) diff --git a/usr/src/lib/libc/common/sys/utssys.s b/usr/src/lib/libc/common/sys/utssys.s index e953257c31..35d4e3fed0 100644 --- a/usr/src/lib/libc/common/sys/utssys.s +++ b/usr/src/lib/libc/common/sys/utssys.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- utssys */ /* error = utssys(cbuf, mv, type, outbufp) */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(utssys,function) - #include "SYS.h" SYSCALL_RVAL1(utssys) diff --git a/usr/src/lib/libc/common/sys/uucopy.s b/usr/src/lib/libc/common/sys/uucopy.s index 758ef92158..d7674f1b23 100644 --- a/usr/src/lib/libc/common/sys/uucopy.s +++ b/usr/src/lib/libc/common/sys/uucopy.s @@ -18,19 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - .file "uucopy.s" - -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(uucopy,function) - ANSI_PRAGMA_WEAK(uucopystr,function) + .file "%M%" #include "SYS.h" diff --git a/usr/src/lib/libc/common/sys/vhangup.s b/usr/src/lib/libc/common/sys/vhangup.s index b8cf195581..1b6a4b58d1 100644 --- a/usr/src/lib/libc/common/sys/vhangup.s +++ b/usr/src/lib/libc/common/sys/vhangup.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -35,10 +34,6 @@ /* C library -- vhangup */ /* int vhangup() */ -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(vhangup,function) - #include "SYS.h" SYSCALL_RVAL1(vhangup) diff --git a/usr/src/lib/libc/common/sys/yield.s b/usr/src/lib/libc/common/sys/yield.s index 5386349c0f..c36b8fe9aa 100644 --- a/usr/src/lib/libc/common/sys/yield.s +++ b/usr/src/lib/libc/common/sys/yield.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,10 +28,6 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(yield,function) - #include "SYS.h" /* diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com index 93e3a5cb69..8303dee02d 100644 --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -114,14 +114,11 @@ GENOBJS= \ i386_data.o \ ladd.o \ ldivide.o \ - lexp10.o \ - llog10.o \ lmul.o \ lock.o \ lshiftl.o \ lsign.o \ lsub.o \ - ltostr.o \ makectxt.o \ memccpy.o \ memchr.o \ @@ -484,11 +481,13 @@ PORTGEN= \ l64a.o \ lckpwdf.o \ lconstants.o \ + lexp10.o \ lfind.o \ lfmt.o \ lfmt_log.o \ llabs.o \ lldiv.o \ + llog10.o \ lltostr.o \ localtime.o \ lsearch.o \ @@ -1046,9 +1045,6 @@ SRCS= \ $(UNWINDMACHOBJS:%.o=../port/unwind/%.c) \ $(FPOBJS:%.o=../$(MACH)/fp/%.c) \ $(LIBCBASE)/gen/ecvt.c \ - $(LIBCBASE)/gen/lexp10.c \ - $(LIBCBASE)/gen/llog10.c \ - $(LIBCBASE)/gen/ltostr.c \ $(LIBCBASE)/gen/makectxt.c \ $(LIBCBASE)/gen/siginfolst.c \ $(LIBCBASE)/gen/siglongjmp.c \ diff --git a/usr/src/lib/libc/i386/fp/_base_il.c b/usr/src/lib/libc/i386/fp/_base_il.c index d20789999a..a821932d41 100644 --- a/usr/src/lib/libc/i386/fp/_base_il.c +++ b/usr/src/lib/libc/i386/fp/_base_il.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" /* The following should be coded as inline expansion templates. */ diff --git a/usr/src/lib/libc/i386/fp/fpgetmask.c b/usr/src/lib/libc/i386/fp/fpgetmask.c index 3e9771cd4b..0dea85fafa 100644 --- a/usr/src/lib/libc/i386/fp/fpgetmask.c +++ b/usr/src/lib/libc/i386/fp/fpgetmask.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpgetmask = _fpgetmask +#pragma weak _fpgetmask = fpgetmask -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" @@ -44,7 +44,3 @@ fpgetmask() _getcw(&cw); return (fp_except)(~cw.mask & EXCPMASK); } - - - - diff --git a/usr/src/lib/libc/i386/fp/fpgetround.c b/usr/src/lib/libc/i386/fp/fpgetround.c index 35acea5fb7..49e11bbb14 100644 --- a/usr/src/lib/libc/i386/fp/fpgetround.c +++ b/usr/src/lib/libc/i386/fp/fpgetround.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpgetround = _fpgetround +#pragma weak _fpgetround = fpgetround -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" @@ -42,5 +42,5 @@ fpgetround() struct _cw87 cw; _getcw(&cw); - return (fp_rnd)cw.rnd; + return ((fp_rnd)cw.rnd); } diff --git a/usr/src/lib/libc/i386/fp/fpgetsticky.c b/usr/src/lib/libc/i386/fp/fpgetsticky.c index ab45e2b910..92a16785aa 100644 --- a/usr/src/lib/libc/i386/fp/fpgetsticky.c +++ b/usr/src/lib/libc/i386/fp/fpgetsticky.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include <ieeefp.h> -#include "synonyms.h" +#pragma weak _fpgetsticky = fpgetsticky -#pragma weak fpgetsticky = _fpgetsticky +#include "lint.h" +#include <ieeefp.h> extern int _sse_hw; extern void _getsw(int *), _getmxcsr(int *); diff --git a/usr/src/lib/libc/i386/fp/fpsetmask.c b/usr/src/lib/libc/i386/fp/fpsetmask.c index 86bc442f04..dc14162934 100644 --- a/usr/src/lib/libc/i386/fp/fpsetmask.c +++ b/usr/src/lib/libc/i386/fp/fpsetmask.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpsetmask = _fpsetmask +#pragma weak _fpsetmask = fpsetmask -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" diff --git a/usr/src/lib/libc/i386/fp/fpsetround.c b/usr/src/lib/libc/i386/fp/fpsetround.c index 901cc14a1a..cdd78261d3 100644 --- a/usr/src/lib/libc/i386/fp/fpsetround.c +++ b/usr/src/lib/libc/i386/fp/fpsetround.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ -/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak fpsetround = _fpsetround +#pragma weak _fpsetround = fpsetround -#include "synonyms.h" +#include "lint.h" #include <ieeefp.h> #include "fp.h" diff --git a/usr/src/lib/libc/i386/fp/fpsetsticky.c b/usr/src/lib/libc/i386/fp/fpsetsticky.c index d464303200..67fe9a08cf 100644 --- a/usr/src/lib/libc/i386/fp/fpsetsticky.c +++ b/usr/src/lib/libc/i386/fp/fpsetsticky.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" +#include "lint.h" #include <ieeefp.h> -#include "synonyms.h" -#pragma weak fpsetsticky = _fpsetsticky +#pragma weak _fpsetsticky = fpsetsticky extern int _sse_hw; extern void _getsw(int *), _putsw(int), _getmxcsr(int *), _putmxcsr(int); diff --git a/usr/src/lib/libc/i386/fp/fpstart.c b/usr/src/lib/libc/i386/fp/fpstart.c index 7c5a1bb291..141ca99db9 100644 --- a/usr/src/lib/libc/i386/fp/fpstart.c +++ b/usr/src/lib/libc/i386/fp/fpstart.c @@ -46,7 +46,7 @@ #pragma weak _fpstart = __fpstart -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/sysi86.h> /* for SI86FPHW/SI86FPSTART definitions */ #include <sys/fp.h> /* for FPU_CW_INIT and SSE_MXCSR_INIT */ diff --git a/usr/src/lib/libc/i386/gen/ecvt.c b/usr/src/lib/libc/i386/gen/ecvt.c index 4ad7319792..b791e513cf 100644 --- a/usr/src/lib/libc/i386/gen/ecvt.c +++ b/usr/src/lib/libc/i386/gen/ecvt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" /* @@ -37,13 +36,11 @@ * sign is set to 0 for positive, 1 for negative * */ -#pragma weak ecvt = _ecvt -#pragma weak fcvt = _fcvt -#pragma weak qecvt = _qecvt -#pragma weak qfcvt = _qfcvt -#pragma weak qgcvt = _qgcvt -#include "synonyms.h" +#pragma weak _ecvt = ecvt +#pragma weak _fcvt = fcvt + +#include "lint.h" #include <sys/types.h> #include <stdlib.h> #include <floatingpoint.h> diff --git a/usr/src/lib/libc/i386/gen/ladd.s b/usr/src/lib/libc/i386/gen/ladd.s index d20596666d..6b3b7ffde1 100644 --- a/usr/src/lib/libc/i386/gen/ladd.s +++ b/usr/src/lib/libc/i386/gen/ladd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" / Double long add routine. -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(ladd,function) - #include "SYS.h" .set lop,4 diff --git a/usr/src/lib/libc/i386/gen/ldivide.s b/usr/src/lib/libc/i386/gen/ldivide.s index a75b5e3f52..3df4afcb36 100644 --- a/usr/src/lib/libc/i386/gen/ldivide.s +++ b/usr/src/lib/libc/i386/gen/ldivide.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" / Double long divide routine. -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(ldivide,function) - #include "SYS.h" .set lop,16 diff --git a/usr/src/lib/libc/i386/gen/lmul.s b/usr/src/lib/libc/i386/gen/lmul.s index 2007f34682..c25ca556f7 100644 --- a/usr/src/lib/libc/i386/gen/lmul.s +++ b/usr/src/lib/libc/i386/gen/lmul.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" / Double long multiply routine. -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(lmul,function) - #include "SYS.h" .set lop,8 diff --git a/usr/src/lib/libc/i386/gen/lshiftl.s b/usr/src/lib/libc/i386/gen/lshiftl.s index 29dbe1e5ba..1d684ccc1e 100644 --- a/usr/src/lib/libc/i386/gen/lshiftl.s +++ b/usr/src/lib/libc/i386/gen/lshiftl.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" / Shift a double long value. -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(lshiftl,function) - #include "SYS.h" .set arg,8 diff --git a/usr/src/lib/libc/i386/gen/lsign.s b/usr/src/lib/libc/i386/gen/lsign.s index 5bfc198a31..2854113a28 100644 --- a/usr/src/lib/libc/i386/gen/lsign.s +++ b/usr/src/lib/libc/i386/gen/lsign.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" / Determine the sign of a double-long number. -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(lsign,function) - #include "SYS.h" ENTRY(lsign) diff --git a/usr/src/lib/libc/i386/gen/lsub.s b/usr/src/lib/libc/i386/gen/lsub.s index 92e744ed1a..db39d376a1 100644 --- a/usr/src/lib/libc/i386/gen/lsub.s +++ b/usr/src/lib/libc/i386/gen/lsub.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" / Double long subtraction routine. -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(lsub,function) - #include "SYS.h" .set lop,4 diff --git a/usr/src/lib/libc/i386/gen/makectxt.c b/usr/src/lib/libc/i386/gen/makectxt.c index 6432bbf1d0..d72a67a481 100644 --- a/usr/src/lib/libc/i386/gen/makectxt.c +++ b/usr/src/lib/libc/i386/gen/makectxt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak makecontext = _makecontext +#pragma weak _makecontext = makecontext -#include "synonyms.h" +#include "lint.h" #include <stdarg.h> #include <ucontext.h> #include <sys/stack.h> diff --git a/usr/src/lib/libc/i386/gen/siglongjmp.c b/usr/src/lib/libc/i386/gen/siglongjmp.c index 1b3296d93d..ea23fcf749 100644 --- a/usr/src/lib/libc/i386/gen/siglongjmp.c +++ b/usr/src/lib/libc/i386/gen/siglongjmp.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,18 +30,16 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak siglongjmp = _siglongjmp +#pragma weak _siglongjmp = siglongjmp -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/ucontext.h> #include <setjmp.h> #include <ucontext.h> -extern int _setcontext(const ucontext_t *); - void -_siglongjmp(sigjmp_buf env, int val) +siglongjmp(sigjmp_buf env, int val) { ucontext_t *ucp = (ucontext_t *)env; @@ -50,5 +48,5 @@ _siglongjmp(sigjmp_buf env, int val) else ucp->uc_mcontext.gregs[EAX] = 1; - (void) _setcontext(ucp); + (void) setcontext(ucp); } diff --git a/usr/src/lib/libc/i386/gen/wschr.s b/usr/src/lib/libc/i386/gen/wschr.s index bf0a217b9d..2cf1809cf2 100644 --- a/usr/src/lib/libc/i386/gen/wschr.s +++ b/usr/src/lib/libc/i386/gen/wschr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -33,19 +33,15 @@ / / Algorithm based on Solaris 2.6 gen/strchr.s implementation / -/ .ident "@(#)strchr.s 1.1 92/04/17 SMI" -/ -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(wcschr,function) ANSI_PRAGMA_WEAK(wschr,function) -#include "SYS.h" - .align 8 / accounts for .loop alignment and prolog - ENTRY(_wcschr) + ENTRY(wcschr) movl 4(%esp),%eax / %eax = string address movl 8(%esp),%ecx / %ecx = wchar sought .loop: @@ -88,16 +84,16 @@ addl $4,%eax .found: ret - SET_SIZE(_wcschr) + SET_SIZE(wcschr) - ENTRY(_wschr) + ENTRY(wschr) _prologue_ movl _esp_(8),%eax movl _esp_(4),%edx pushl %eax pushl %edx - call _fref_(_wcschr) + call _fref_(wcschr) addl $8,%esp _epilogue_ ret - SET_SIZE(_wschr) + SET_SIZE(wschr) diff --git a/usr/src/lib/libc/i386/gen/wslen.s b/usr/src/lib/libc/i386/gen/wslen.s index 5d428e84cc..3431210229 100644 --- a/usr/src/lib/libc/i386/gen/wslen.s +++ b/usr/src/lib/libc/i386/gen/wslen.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -32,7 +32,7 @@ * Wide character wcslen() implementation * * size_t - * _wcslen(const wchar_t *s) + * wcslen(const wchar_t *s) *{ * const wchar_t *s0 = s + 1; * while (*s++) @@ -41,14 +41,12 @@ *} */ -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(wcslen,function) ANSI_PRAGMA_WEAK(wslen,function) -#include "SYS.h" - - ENTRY(_wcslen) + ENTRY(wcslen) movl 4(%esp),%edx xorl %eax,%eax @@ -81,16 +79,16 @@ .out3: add $3, %eax ret - SET_SIZE(_wcslen) + SET_SIZE(wcslen) - ENTRY(_wslen) + ENTRY(wslen) _prologue_ movl _esp_(8),%eax movl _esp_(4),%edx pushl %eax pushl %edx - call _fref_(_wcslen) + call _fref_(wcslen) addl $8,%esp _epilogue_ ret - SET_SIZE(_wslen) + SET_SIZE(wslen) diff --git a/usr/src/lib/libc/i386/gen/wsncmp.s b/usr/src/lib/libc/i386/gen/wsncmp.s index 54b05f8342..995187a827 100644 --- a/usr/src/lib/libc/i386/gen/wsncmp.s +++ b/usr/src/lib/libc/i386/gen/wsncmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -33,17 +33,13 @@ / / Algorithm based on Solaris 2.6 gen/strncpy.s implementation / -/ .ident "@(#)strncpy.s 1.1 92/04/17 SMI" -/ -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(wcsncmp,function) ANSI_PRAGMA_WEAK(wsncmp,function) -#include "SYS.h" - - ENTRY(_wcsncmp) + ENTRY(wcsncmp) pushl %esi / save register variables movl 8(%esp),%esi / %esi = first string movl %edi,%edx @@ -105,9 +101,9 @@ subl (%edi),%eax / return value is (*s1 - *--s2) movl %edx,%edi ret - SET_SIZE(_wcsncmp) + SET_SIZE(wcsncmp) - ENTRY(_wsncmp) + ENTRY(wsncmp) _prologue_ movl _esp_(12),%ecx movl _esp_(8),%eax @@ -115,8 +111,8 @@ pushl %ecx pushl %eax pushl %edx - call _fref_(_wcsncmp) + call _fref_(wcsncmp) addl $12,%esp _epilogue_ ret - SET_SIZE(_wsncmp) + SET_SIZE(wsncmp) diff --git a/usr/src/lib/libc/i386/inc/SYS.h b/usr/src/lib/libc/i386/inc/SYS.h index eaba7aee91..b5f7d7c938 100644 --- a/usr/src/lib/libc/i386/inc/SYS.h +++ b/usr/src/lib/libc/i386/inc/SYS.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,9 +34,7 @@ */ #include <sys/asm_linkage.h> #include <sys/syscall.h> -#include <sys/trap.h> #include <sys/errno.h> -#include "synonyms.h" #define _prologue_ \ pushl %ebx; \ diff --git a/usr/src/lib/libc/i386/mapfile-vers b/usr/src/lib/libc/i386/mapfile-vers index 2229e9d71b..a58c2f858e 100644 --- a/usr/src/lib/libc/i386/mapfile-vers +++ b/usr/src/lib/libc/i386/mapfile-vers @@ -40,7 +40,6 @@ SUNW_1.23 { enable_extended_FILE_stdio; lio_listio64; mkstemps64; - _mkstemps64; posix_fallocate64; }; @@ -924,6 +923,7 @@ SUNWprivate_1.1 { __xtoull; local: + _syscall6 = NODYNSORT; __systemcall6 = NODYNSORT; _seekdir64 = NODYNSORT; _telldir64 = NODYNSORT; diff --git a/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s b/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s index 1154c72140..3133ba1fe8 100644 --- a/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s +++ b/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s @@ -28,12 +28,8 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(_lwp_mutex_unlock,function) - #include "SYS.h" -#include <assym.h> +#include <../assym.h> ENTRY(_lwp_mutex_unlock) movl 4(%esp), %eax diff --git a/usr/src/lib/libc/i386/sys/door.s b/usr/src/lib/libc/i386/sys/door.s index 799d9e17fd..92ef56eff8 100644 --- a/usr/src/lib/libc/i386/sys/door.s +++ b/usr/src/lib/libc/i386/sys/door.s @@ -28,27 +28,18 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" +#include <sys/door.h> /* * weak aliases for public interfaces */ - ANSI_PRAGMA_WEAK(_door_bind,function) - ANSI_PRAGMA_WEAK(_door_getparam,function) - ANSI_PRAGMA_WEAK(_door_info,function) - ANSI_PRAGMA_WEAK(_door_revoke,function) - ANSI_PRAGMA_WEAK(_door_setparam,function) - ANSI_PRAGMA_WEAK(_door_unbind,function) - - ANSI_PRAGMA_WEAK(door_bind,function) - ANSI_PRAGMA_WEAK(door_getparam,function) - ANSI_PRAGMA_WEAK(door_info,function) - ANSI_PRAGMA_WEAK(door_revoke,function) - ANSI_PRAGMA_WEAK(door_setparam,function) - ANSI_PRAGMA_WEAK(door_unbind,function) - -#include <sys/door.h> -#include "SYS.h" + ANSI_PRAGMA_WEAK2(door_bind,__door_bind,function) + ANSI_PRAGMA_WEAK2(door_getparam,__door_getparam,function) + ANSI_PRAGMA_WEAK2(door_info,__door_info,function) + ANSI_PRAGMA_WEAK2(door_revoke,__door_revoke,function) + ANSI_PRAGMA_WEAK2(door_setparam,__door_setparam,function) + ANSI_PRAGMA_WEAK2(door_unbind,__door_unbind,function) /* * Offsets within struct door_results @@ -177,7 +168,7 @@ door_restart: call *%eax /* Exit the thread if we return here */ pushl $0 - call _thr_terminate + call _thrp_terminate /* NOTREACHED */ 2: /* diff --git a/usr/src/lib/libc/i386/sys/gettimeofday.s b/usr/src/lib/libc/i386/sys/gettimeofday.s index 07f69d4a8e..e54a71121b 100644 --- a/usr/src/lib/libc/i386/sys/gettimeofday.s +++ b/usr/src/lib/libc/i386/sys/gettimeofday.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,19 +28,17 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(gettimeofday,function) -#include "SYS.h" - / / implements int gettimeofday(struct timeval *tp, void *tzp) / / note that tzp is always ignored / - ENTRY(_gettimeofday) + ENTRY(gettimeofday) / / use long long gethrestime() / @@ -59,6 +57,6 @@ movl %edx, 4(%ecx) / store usecs into timeval ptr + 4. 1: RETC / return 0 - SET_SIZE(_gettimeofday) + SET_SIZE(gettimeofday) diff --git a/usr/src/lib/libc/i386/sys/lwp_private.s b/usr/src/lib/libc/i386/sys/lwp_private.s index d6f0f0621a..757dd83209 100644 --- a/usr/src/lib/libc/i386/sys/lwp_private.s +++ b/usr/src/lib/libc/i386/sys/lwp_private.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - .file "lwp_private.s" - -#include <sys/asm_linkage.h> + .file "%M%" #include "SYS.h" /* * int - * __lwp_setprivate(int cmd, int which, void *base) + * ___lwp_private(int cmd, int which, void *base) */ ENTRY(___lwp_private) SYSTRAP_RVAL1(lwp_private) diff --git a/usr/src/lib/libc/i386/sys/nuname.s b/usr/src/lib/libc/i386/sys/nuname.s index d87120f665..1d7ea9ecc9 100644 --- a/usr/src/lib/libc/i386/sys/nuname.s +++ b/usr/src/lib/libc/i386/sys/nuname.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,14 +28,12 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(nuname,function) -#include "SYS.h" - - ENTRY(_nuname) + ENTRY(nuname) SYSTRAP_RVAL1(uname) SYSCERROR RET - SET_SIZE(_nuname) + SET_SIZE(nuname) diff --git a/usr/src/lib/libc/i386/sys/ptrace.c b/usr/src/lib/libc/i386/sys/ptrace.c index 5cd033bdb0..470f79663a 100644 --- a/usr/src/lib/libc/i386/sys/ptrace.c +++ b/usr/src/lib/libc/i386/sys/ptrace.c @@ -30,9 +30,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak ptrace = _ptrace +#pragma weak _ptrace = ptrace -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/usr/src/lib/libc/i386/sys/syscall.s b/usr/src/lib/libc/i386/sys/syscall.s index 503c8a0001..886cec9b8a 100644 --- a/usr/src/lib/libc/i386/sys/syscall.s +++ b/usr/src/lib/libc/i386/sys/syscall.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,22 +28,17 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" #include <sys/trap.h> ANSI_PRAGMA_WEAK(syscall,function) -#include "SYS.h" - -#undef _syscall /* override "synonyms.h" */ -#undef __systemcall - /* - * See sparc/sys/syscall.s to understand why __syscall6() exists. + * See sparc/sys/syscall.s to understand why _syscall6() exists. * On x86, the implementation of the two are the same, the only - * difference being that __syscall6 is not an exported symbol. + * difference being that _syscall6 is not an exported symbol. */ - ENTRY2(_syscall,_syscall6) + ENTRY2(syscall,_syscall6) popl %edx / return address popl %eax / system call number pushl %edx @@ -63,7 +58,7 @@ pushl %edx / restore the return address SYSCERROR ret - SET_SIZE(_syscall) + SET_SIZE(syscall) SET_SIZE(_syscall6) /* diff --git a/usr/src/lib/libc/i386/sys/sysi86.s b/usr/src/lib/libc/i386/sys/sysi86.s index 14e47db53c..bb1edbfd2a 100644 --- a/usr/src/lib/libc/i386/sys/sysi86.s +++ b/usr/src/lib/libc/i386/sys/sysi86.s @@ -28,14 +28,10 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(sysi86,function) -#include "SYS.h" - - ENTRY(_sysi86) - SYSTRAP_RVAL1(sysi86) - SYSCERROR + SYSCALL_RVAL1(sysi86) RET - SET_SIZE(_sysi86) + SET_SIZE(sysi86) diff --git a/usr/src/lib/libc/i386/sys/uadmin.c b/usr/src/lib/libc/i386/sys/uadmin.c index 8caf6d5bc3..bc15f4a9e3 100644 --- a/usr/src/lib/libc/i386/sys/uadmin.c +++ b/usr/src/lib/libc/i386/sys/uadmin.c @@ -26,8 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak uadmin = _uadmin - /* * Wrapper function to implement reboot w/ arguments on x86 * platforms. Extract reboot arguments and place them in @@ -35,7 +33,7 @@ * All other commands are passed through. */ -#include "synonyms.h" +#include "lint.h" #include <fcntl.h> #include <ctype.h> #include <stdio.h> diff --git a/usr/src/lib/libc/i386/sys/vforkx.s b/usr/src/lib/libc/i386/sys/vforkx.s index 4659498dc5..be14d9757a 100644 --- a/usr/src/lib/libc/i386/sys/vforkx.s +++ b/usr/src/lib/libc/i386/sys/vforkx.s @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,11 +28,6 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(vforkx,function) - ANSI_PRAGMA_WEAK(vfork,function) - #include "SYS.h" #include <assym.h> diff --git a/usr/src/lib/libc/i386/threads/asm_subr.s b/usr/src/lib/libc/i386/threads/asm_subr.s index 232cb09893..622ea3f250 100644 --- a/usr/src/lib/libc/i386/threads/asm_subr.s +++ b/usr/src/lib/libc/i386/threads/asm_subr.s @@ -32,11 +32,11 @@ / This is where execution resumes when a thread created with / thr_create() or pthread_create() returns (see setup_context()). - / We pass the (void *) return value to _thr_terminate(). + / We pass the (void *) return value to _thrp_terminate(). ENTRY(_lwp_start) addl $4, %esp pushl %eax - call _thr_terminate + call _thrp_terminate addl $4, %esp / actually, never returns SET_SIZE(_lwp_start) diff --git a/usr/src/lib/libc/i386/threads/machdep.c b/usr/src/lib/libc/i386/threads/machdep.c index c5b8e2d118..d1c8d34437 100644 --- a/usr/src/lib/libc/i386/threads/machdep.c +++ b/usr/src/lib/libc/i386/threads/machdep.c @@ -70,7 +70,7 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *), * to pass down self pointer and set %gs selector * value so __lwp_create() can setup %gs atomically. * Without this we would need to block all signals - * and directly call __lwp_setprivate() in _thr_setup + * and directly call ___lwp_private() in _thrp_setup * on the other side of __lwp_create(). */ ucp->uc_mcontext.gregs[ESP] = (greg_t)ulwp; @@ -98,7 +98,7 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *), * Machine-dependent startup code for a newly-created thread. */ void * -_thr_setup(ulwp_t *self) +_thrp_setup(ulwp_t *self) { self->ul_ustack.ss_sp = (void *)(self->ul_stktop - self->ul_stksiz); self->ul_ustack.ss_size = self->ul_stksiz; diff --git a/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s b/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s index 745a1ce5d7..ebecf1e1a8 100644 --- a/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s +++ b/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s @@ -24,7 +24,7 @@ * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -33,8 +33,6 @@ ANSI_PRAGMA_WEAK(memmove,function) ANSI_PRAGMA_WEAK(memcpy,function) -#include "SYS.h" - ENTRY(memmove) movl 0+12(%esp),%ecx / get number of bytes to move pushl %esi / save off %edi, %esi and move destination diff --git a/usr/src/lib/libc/i386_hwcap1/gen/memset.s b/usr/src/lib/libc/i386_hwcap1/gen/memset.s index 740173118e..bbdb71c870 100644 --- a/usr/src/lib/libc/i386_hwcap1/gen/memset.s +++ b/usr/src/lib/libc/i386_hwcap1/gen/memset.s @@ -24,7 +24,7 @@ * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -32,8 +32,6 @@ ANSI_PRAGMA_WEAK(memset,function) -#include "SYS.h" - ENTRY(memset) pushl %edi / save register variable movl 8(%esp),%edi / %edi = string address diff --git a/usr/src/lib/libc/inc/base_conversion.h b/usr/src/lib/libc/inc/base_conversion.h index f3b8d5d1e8..c118110c84 100644 --- a/usr/src/lib/libc/inc/base_conversion.h +++ b/usr/src/lib/libc/inc/base_conversion.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -230,20 +229,18 @@ typedef struct { /* PRIVATE GLOBAL VARIABLES */ /* - * Flags to indicate whether any NaNs or infinities have been read - * or written. These are exported solely for the use of the old - * Sun Fortran runtime library. Once that becomes obsolete, these - * can be removed. + * Thread-specific flags to indicate whether any NaNs or infinities + * have been read or written. */ -extern int *_thr_get_inf_read(void); -extern int *_thr_get_inf_written(void); -extern int *_thr_get_nan_read(void); -extern int *_thr_get_nan_written(void); - -#define __inf_read (*(int *)_thr_get_inf_read()) -#define __inf_written (*(int *)_thr_get_inf_written()) -#define __nan_read (*(int *)_thr_get_nan_read()) -#define __nan_written (*(int *)_thr_get_nan_written()) +extern int *_thrp_get_inf_read(void); +extern int *_thrp_get_inf_written(void); +extern int *_thrp_get_nan_read(void); +extern int *_thrp_get_nan_written(void); + +#define __inf_read (*(int *)_thrp_get_inf_read()) +#define __inf_written (*(int *)_thrp_get_inf_written()) +#define __nan_read (*(int *)_thrp_get_nan_read()) +#define __nan_written (*(int *)_thrp_get_nan_written()) /* * Powers of 5 in base 2**16 and powers of 2 in base 10**4. diff --git a/usr/src/lib/libc/inc/libc.h b/usr/src/lib/libc/inc/libc.h index 1136e09665..4059d08d8e 100644 --- a/usr/src/lib/libc/inc/libc.h +++ b/usr/src/lib/libc/inc/libc.h @@ -59,7 +59,6 @@ extern "C" { extern void __set_panicstr(const char *); extern void _rewind_unlocked(FILE *); -extern int _rename(const char *, const char *); extern long _sysconfig(int); extern int kill(pid_t pid, int sig); @@ -79,12 +78,6 @@ extern void *libc_malloc(size_t); extern void *libc_realloc(void *, size_t); extern void libc_free(void *); extern char *libc_strdup(const char *); -extern int _sigwait(sigset_t *); -extern int _thr_getspecific(thread_key_t key, void **valuep); -extern int _thr_setspecific(unsigned int key, void *value); -extern int _thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)); -extern int _thr_keycreate_once(thread_key_t *pkey, void (*destructor)(void *)); -extern void *_pthread_getspecific(thread_key_t); extern int _pollsys(struct pollfd *, nfds_t, const timespec_t *, const sigset_t *); @@ -246,17 +239,6 @@ extern uint_t __xpg6; /* global */ extern uint_t libc__xpg6; /* copy of __xpg6, private to libc */ /* - * i18n prototypes - strong symbols (weak symbols are in libintl.h) - */ -extern char *_textdomain(const char *); -extern char *_bindtextdomain(const char *, const char *); -extern char *_dcgettext(const char *, const char *, const int); -extern char *_dgettext(const char *, const char *); -extern char *_gettext(const char *); -extern int _fnmatch(const char *, const char *, int); - - -/* * defined in port/stdio/doscan.c */ extern int _doscan(FILE *, const char *, va_list); @@ -324,30 +306,6 @@ extern wint_t _putwc(wint_t, FILE *); */ extern wint_t __ungetwc_xpg5(wint_t, FILE *); -/* - * defined in wscmp.c - */ -extern int _wcscmp(const wchar_t *, const wchar_t *); - -/* - * defined in wslen.c - */ -extern size_t _wcslen(const wchar_t *); - -/* - * defined in wscpy.c - */ -extern wchar_t *_wcscpy(wchar_t *, const wchar_t *); - -/* - * misc synonyms - */ -extern int _wctomb(char *, wchar_t); -extern wint_t _towlower(wint_t); -extern int _doscan(FILE *, const char *, va_list); -extern int _wcscoll(const wchar_t *, const wchar_t *); -extern size_t _wcsxfrm(wchar_t *, const wchar_t *, size_t); -extern wint_t _fputwc(wint_t, FILE *); #ifdef __cplusplus } #endif diff --git a/usr/src/lib/libc/inc/lint.h b/usr/src/lib/libc/inc/lint.h index 48098ab61a..d031a250c5 100644 --- a/usr/src/lib/libc/inc/lint.h +++ b/usr/src/lib/libc/inc/lint.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -37,12 +37,22 @@ extern "C" { * We must include "lint.h" as the first #include in all libc source files * for the purpose of running lint over libc, else lint errors occur due to * lint not knowing the details of the implementation of locales and stdio. - * "synonyms.h" includes "lint.h" so only the files that do not include - * "synonyms.h" need to explicitly include "lint.h". */ #if defined(__lint) + #include "mbstatet.h" #include "file64.h" + +#else + +/* + * Small optimization for callers of syscall() and __systemcall(). + * This could/should be defined elsewhere, but here is a particularly + * attractive place since all source files in libc include "lint.h". + */ +#define syscall _syscall6 +#define __systemcall __systemcall6 + #endif #ifdef __cplusplus diff --git a/usr/src/lib/libc/inc/mtlib.h b/usr/src/lib/libc/inc/mtlib.h index af4264c775..aa5e9e0992 100644 --- a/usr/src/lib/libc/inc/mtlib.h +++ b/usr/src/lib/libc/inc/mtlib.h @@ -39,13 +39,6 @@ extern "C" { extern int primary_link_map; extern void lmutex_lock(mutex_t *); extern void lmutex_unlock(mutex_t *); -extern int __rwlock_init(rwlock_t *, int, void *); -extern int __rwlock_destroy(rwlock_t *); -extern int __rw_rdlock(rwlock_t *); -extern int __rw_wrlock(rwlock_t *); -extern int __rw_tryrdlock(rwlock_t *); -extern int __rw_trywrlock(rwlock_t *); -extern int __rw_unlock(rwlock_t *); extern void lrw_rdlock(rwlock_t *); extern void lrw_wrlock(rwlock_t *); extern void lrw_unlock(rwlock_t *); @@ -58,53 +51,12 @@ extern void cancel_safe_mutex_lock(mutex_t *); extern void cancel_safe_mutex_unlock(mutex_t *); extern int cancel_safe_mutex_trylock(mutex_t *); extern int cancel_active(void); +extern int _thrp_cancelled(void); /* the private libc thread-safe allocator */ extern void *lmalloc(size_t); extern void lfree(void *, size_t); -/* the rest are public functions */ -extern int _mutex_init(mutex_t *, int, void *); -extern int _mutex_destroy(mutex_t *); -extern int _mutex_lock(mutex_t *); -extern int _mutex_trylock(mutex_t *); -extern int _mutex_unlock(mutex_t *); -extern int __mutex_init(mutex_t *, int, void *); -extern int __mutex_destroy(mutex_t *); -extern int __mutex_lock(mutex_t *); -extern int __mutex_trylock(mutex_t *); -extern int __mutex_unlock(mutex_t *); - -extern int _cond_init(cond_t *, int, void *); -extern int _cond_destroy(cond_t *); -extern int __cond_wait(cond_t *, mutex_t *); -extern int __cond_timedwait(cond_t *, mutex_t *, const timespec_t *); -extern int __cond_reltimedwait(cond_t *, mutex_t *, const timespec_t *); -extern int _cond_signal(cond_t *); -extern int _cond_broadcast(cond_t *); - -extern int _rwlock_init(rwlock_t *, int, void *); -extern int _rwlock_destroy(rwlock_t *); -extern int _rw_rdlock(rwlock_t *); -extern int _rw_wrlock(rwlock_t *); -extern int _rw_tryrdlock(rwlock_t *); -extern int _rw_trywrlock(rwlock_t *); -extern int _rw_unlock(rwlock_t *); - -extern int _thr_main(void); -extern thread_t _thr_self(void); -extern int _thrp_cancelled(void); -extern void _thr_exit(void *); -extern size_t _thr_min_stack(void); -extern int _thr_kill(thread_t, int); -extern int _thr_create(void *, size_t, void *(*)(void *), void *, long, - thread_t *); -extern int _thr_keycreate(thread_key_t *, void (*)(void *)); -extern int _thr_keycreate_once(thread_key_t *, void (*)(void *)); -extern int _thr_setspecific(thread_key_t, void *); -extern int _thr_getspecific(thread_key_t, void **); -extern void *_pthread_getspecific(thread_key_t); - #if defined(THREAD_DEBUG) extern void assert_no_libc_locks_held(void); #else diff --git a/usr/src/lib/libc/inc/thr_uberdata.h b/usr/src/lib/libc/inc/thr_uberdata.h index e9c25465e8..a6415ed301 100644 --- a/usr/src/lib/libc/inc/thr_uberdata.h +++ b/usr/src/lib/libc/inc/thr_uberdata.h @@ -38,6 +38,7 @@ #include <ucontext.h> #include <thread.h> #include <pthread.h> +#include <atomic.h> #include <link.h> #include <sys/resource.h> #include <sys/lwp.h> @@ -1288,7 +1289,7 @@ extern void set_cancel_eintr_flag(ulwp_t *); extern void set_parking_flag(ulwp_t *, int); extern int cancel_active(void); -extern void *_thr_setup(ulwp_t *); +extern void *_thrp_setup(ulwp_t *); extern void _fpinherit(ulwp_t *); extern void _lwp_start(void); extern void _lwp_terminate(void); @@ -1333,7 +1334,6 @@ extern void _thrp_unwind(void *); extern pid_t __forkx(int); extern pid_t __forkallx(int); -extern int _kill(pid_t, int); extern int __open(const char *, int, ...); extern int __close(int); extern ssize_t __read(int, void *, size_t); @@ -1341,8 +1341,6 @@ extern ssize_t __write(int, const void *, size_t); extern int __fcntl(int, int, ...); extern int __lwp_continue(lwpid_t); extern int __lwp_create(ucontext_t *, uint_t, lwpid_t *); -extern int __lwp_kill(lwpid_t, int); -extern lwpid_t __lwp_self(void); extern int ___lwp_suspend(lwpid_t); extern int lwp_wait(lwpid_t, lwpid_t *); extern int __lwp_wait(lwpid_t, lwpid_t *); @@ -1361,88 +1359,35 @@ extern int __lwp_sigmask(int, const sigset_t *, sigset_t *); extern void __sighndlr(int, siginfo_t *, ucontext_t *, void (*)()); extern caddr_t __sighndlrend; #pragma unknown_control_flow(__sighndlr) -extern void _siglongjmp(sigjmp_buf, int); - -extern int _pthread_setspecific(pthread_key_t, const void *); -extern void *_pthread_getspecific(pthread_key_t); -extern void _pthread_exit(void *); -extern int _pthread_setcancelstate(int, int *); /* belongs in <pthread.h> */ #define PTHREAD_CREATE_DAEMON_NP 0x100 /* = THR_DAEMON */ #define PTHREAD_CREATE_NONDAEMON_NP 0 -extern int _pthread_attr_setdaemonstate_np(pthread_attr_t *, int); -extern int _pthread_attr_getdaemonstate_np(const pthread_attr_t *, int *); - -extern int _mutex_init(mutex_t *, int, void *); -extern int _mutex_destroy(mutex_t *); -extern int _mutex_consistent(mutex_t *); -extern int _mutex_lock(mutex_t *); -extern int _mutex_trylock(mutex_t *); -extern int _mutex_unlock(mutex_t *); -extern int __mutex_init(mutex_t *, int, void *); -extern int __mutex_destroy(mutex_t *); -extern int __mutex_consistent(mutex_t *); -extern int __mutex_lock(mutex_t *); -extern int __mutex_trylock(mutex_t *); -extern int __mutex_unlock(mutex_t *); -extern int mutex_is_held(mutex_t *); +extern int pthread_attr_setdaemonstate_np(pthread_attr_t *, int); +extern int pthread_attr_getdaemonstate_np(const pthread_attr_t *, int *); + +extern int mutex_held(mutex_t *); extern int mutex_lock_internal(mutex_t *, timespec_t *, int); extern int mutex_unlock_internal(mutex_t *, int); -extern int _cond_init(cond_t *, int, void *); -extern int _cond_signal(cond_t *); -extern int _cond_broadcast(cond_t *); -extern int _cond_destroy(cond_t *); -extern int cond_signal_internal(cond_t *); -extern int cond_broadcast_internal(cond_t *); -/* cancellation points: */ -extern int _cond_wait(cond_t *, mutex_t *); -extern int _cond_timedwait(cond_t *, mutex_t *, const timespec_t *); -extern int _cond_reltimedwait(cond_t *, mutex_t *, const timespec_t *); /* not cancellation points: */ extern int __cond_wait(cond_t *, mutex_t *); extern int __cond_timedwait(cond_t *, mutex_t *, const timespec_t *); extern int __cond_reltimedwait(cond_t *, mutex_t *, const timespec_t *); -extern int __rwlock_init(rwlock_t *, int, void *); -extern int rw_read_is_held(rwlock_t *); -extern int rw_write_is_held(rwlock_t *); - -extern void _membar_enter(void); -extern void _membar_exit(void); -extern void _membar_producer(void); -extern void _membar_consumer(void); +extern int rw_read_held(rwlock_t *); +extern int rw_write_held(rwlock_t *); -extern int _thr_continue(thread_t); -extern int _thr_create(void *, size_t, void *(*)(void *), void *, long, - thread_t *); extern int _thrp_create(void *, size_t, void *(*)(void *), void *, long, thread_t *, size_t); -extern int _thr_getspecific(thread_key_t, void **); -extern int _thr_join(thread_t, thread_t *, void **); -extern int _thr_keycreate(thread_key_t *, PFrV); -extern int _thr_keycreate_once(thread_key_t *, PFrV); -extern int _thr_key_delete(thread_key_t); -extern int _thr_main(void); -extern thread_t _thr_self(void); -extern int _thr_getconcurrency(void); -extern int _thr_setconcurrency(int); -extern int _thr_setprio(thread_t, int); -extern int _thr_setspecific(thread_key_t, void *); -extern int _thr_stksegment(stack_t *); extern int _thrp_suspend(thread_t, uchar_t); extern int _thrp_continue(thread_t, uchar_t); -extern int _thr_sigsetmask(int, const sigset_t *, sigset_t *); -extern void _thr_terminate(void *); -extern void _thr_exit(void *); +extern void _thrp_terminate(void *); extern void _thrp_exit(void); extern const pcclass_t *get_info_by_class(id_t); extern const pcclass_t *get_info_by_policy(int); -extern void _membar_producer(void); -extern void _membar_consumer(void); extern const thrattr_t *def_thrattr(void); extern id_t setparam(idtype_t, id_t, int, int); extern id_t setprio(idtype_t, id_t, int, int *); @@ -1457,11 +1402,7 @@ extern int ___lwp_mutex_timedlock(mutex_t *, timespec_t *); extern int ___lwp_mutex_unlock(mutex_t *); extern int ___lwp_mutex_wakeup(mutex_t *, int); extern int ___lwp_cond_wait(cond_t *, mutex_t *, timespec_t *, int); -extern int __lwp_cond_signal(lwp_cond_t *); -extern int __lwp_cond_broadcast(lwp_cond_t *); extern int ___lwp_sema_timedwait(lwp_sema_t *, timespec_t *, int); -extern int __lwp_sema_trywait(lwp_sema_t *); -extern int __lwp_sema_post(lwp_sema_t *); extern int __lwp_rwlock_rdlock(rwlock_t *, timespec_t *); extern int __lwp_rwlock_wrlock(rwlock_t *, timespec_t *); extern int __lwp_rwlock_tryrdlock(rwlock_t *); diff --git a/usr/src/lib/libc/port/aio/aio.c b/usr/src/lib/libc/port/aio/aio.c index 3f88231753..35b9786915 100644 --- a/usr/src/lib/libc/port/aio/aio.c +++ b/usr/src/lib/libc/port/aio/aio.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include "asyncio.h" #include <atomic.h> diff --git a/usr/src/lib/libc/port/aio/aio_alloc.c b/usr/src/lib/libc/port/aio/aio_alloc.c index db919872e4..cd20f6c2be 100644 --- a/usr/src/lib/libc/port/aio/aio_alloc.c +++ b/usr/src/lib/libc/port/aio/aio_alloc.c @@ -20,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include "asyncio.h" diff --git a/usr/src/lib/libc/port/aio/posix_aio.c b/usr/src/lib/libc/port/aio/posix_aio.c index b21eae8152..47736000d0 100644 --- a/usr/src/lib/libc/port/aio/posix_aio.c +++ b/usr/src/lib/libc/port/aio/posix_aio.c @@ -39,7 +39,7 @@ * aio_cancel */ -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include "asyncio.h" #include <atomic.h> diff --git a/usr/src/lib/libc/port/fp/__flt_decim.c b/usr/src/lib/libc/port/fp/__flt_decim.c index 0efe7bd967..549da276cd 100644 --- a/usr/src/lib/libc/port/fp/__flt_decim.c +++ b/usr/src/lib/libc/port/fp/__flt_decim.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,7 +31,7 @@ * floating point */ -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/isa_defs.h> #include "base_conversion.h" diff --git a/usr/src/lib/libc/port/fp/__flt_rounds.c b/usr/src/lib/libc/port/fp/__flt_rounds.c index 0c991987a8..3a208858df 100644 --- a/usr/src/lib/libc/port/fp/__flt_rounds.c +++ b/usr/src/lib/libc/port/fp/__flt_rounds.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,7 +35,7 @@ * -1: indeterminable <<< never returned */ -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <floatingpoint.h> #include "libc.h" diff --git a/usr/src/lib/libc/port/fp/__tbl_10_b.c b/usr/src/lib/libc/port/fp/__tbl_10_b.c index f271114b56..5390bb1386 100644 --- a/usr/src/lib/libc/port/fp/__tbl_10_b.c +++ b/usr/src/lib/libc/port/fp/__tbl_10_b.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> /* table of 16 multiples of 10**64 */ diff --git a/usr/src/lib/libc/port/fp/__tbl_10_h.c b/usr/src/lib/libc/port/fp/__tbl_10_h.c index cdf79a70db..b59ab9c7e5 100644 --- a/usr/src/lib/libc/port/fp/__tbl_10_h.c +++ b/usr/src/lib/libc/port/fp/__tbl_10_h.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> /* table of 5 multiples of 10**1024 */ diff --git a/usr/src/lib/libc/port/fp/__tbl_10_s.c b/usr/src/lib/libc/port/fp/__tbl_10_s.c index 950fdff884..98b2146bc0 100644 --- a/usr/src/lib/libc/port/fp/__tbl_10_s.c +++ b/usr/src/lib/libc/port/fp/__tbl_10_s.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> /* table of 64 multiples of 10**1 */ diff --git a/usr/src/lib/libc/port/fp/__tbl_2_b.c b/usr/src/lib/libc/port/fp/__tbl_2_b.c index 6baa920d31..82c855a9ab 100644 --- a/usr/src/lib/libc/port/fp/__tbl_2_b.c +++ b/usr/src/lib/libc/port/fp/__tbl_2_b.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> /* table of 16 multiples of 2**176 */ diff --git a/usr/src/lib/libc/port/fp/__tbl_2_h.c b/usr/src/lib/libc/port/fp/__tbl_2_h.c index 834084f17e..6a4ddc973d 100644 --- a/usr/src/lib/libc/port/fp/__tbl_2_h.c +++ b/usr/src/lib/libc/port/fp/__tbl_2_h.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> /* table of 6 multiples of 2**2816 */ diff --git a/usr/src/lib/libc/port/fp/__tbl_2_s.c b/usr/src/lib/libc/port/fp/__tbl_2_s.c index b684648531..91cd31693e 100644 --- a/usr/src/lib/libc/port/fp/__tbl_2_s.c +++ b/usr/src/lib/libc/port/fp/__tbl_2_s.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> /* table of 176 multiples of 2**1 */ diff --git a/usr/src/lib/libc/port/fp/__tbl_fdq.c b/usr/src/lib/libc/port/fp/__tbl_fdq.c index b0d163e0c7..01a01b1d40 100644 --- a/usr/src/lib/libc/port/fp/__tbl_fdq.c +++ b/usr/src/lib/libc/port/fp/__tbl_fdq.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include "base_conversion.h" diff --git a/usr/src/lib/libc/port/fp/__tbl_tens.c b/usr/src/lib/libc/port/fp/__tbl_tens.c index e5e25011f9..603d72d196 100644 --- a/usr/src/lib/libc/port/fp/__tbl_tens.c +++ b/usr/src/lib/libc/port/fp/__tbl_tens.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1989-1996 by Sun Microsystems, Inc. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" /* * A table of all the powers of ten that fit exactly in an IEEE double, plus * a few more. */ -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/fp/__x_power.c b/usr/src/lib/libc/port/fp/__x_power.c index b67feab020..137f2a19e5 100644 --- a/usr/src/lib/libc/port/fp/__x_power.c +++ b/usr/src/lib/libc/port/fp/__x_power.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" #include <sys/types.h> #include <malloc.h> @@ -504,7 +504,8 @@ __big_float_times_power(_big_float *pbf, int mult, int n, int precision, /* look for additional trailing zeros to delete */ for (; pbf->bsignificand[trailing_zeros_to_delete] == 0; - trailing_zeros_to_delete++); + trailing_zeros_to_delete++) + continue; if (trailing_zeros_to_delete > 0) { for (j = 0; j < (int)pbf->blength - diff --git a/usr/src/lib/libc/port/fp/_base_sup.c b/usr/src/lib/libc/port/fp/_base_sup.c index 87367fef88..b07957740c 100644 --- a/usr/src/lib/libc/port/fp/_base_sup.c +++ b/usr/src/lib/libc/port/fp/_base_sup.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include "base_conversion.h" #include <sys/isa_defs.h> @@ -112,7 +112,7 @@ __class_quadruple(quadruple *x) (kluge.f.significand4 == 0)) return (fp_infinity); else if ((kluge.f.msw.significand & 0xffff) >= - (unsigned int)0x8000) + (unsigned int)0x8000) return (fp_quiet); else return (fp_signaling); diff --git a/usr/src/lib/libc/port/fp/aconvert.c b/usr/src/lib/libc/port/fp/aconvert.c index e4bf84c63d..833615e1cf 100644 --- a/usr/src/lib/libc/port/fp/aconvert.c +++ b/usr/src/lib/libc/port/fp/aconvert.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" /* translation table from hex values to hex chars */ diff --git a/usr/src/lib/libc/port/fp/decimal_bin.c b/usr/src/lib/libc/port/fp/decimal_bin.c index 4d5703da08..993da63db6 100644 --- a/usr/src/lib/libc/port/fp/decimal_bin.c +++ b/usr/src/lib/libc/port/fp/decimal_bin.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,12 +30,7 @@ * Conversion from decimal to binary floating point */ -#pragma weak decimal_to_single = _decimal_to_single -#pragma weak decimal_to_double = _decimal_to_double -#pragma weak decimal_to_extended = _decimal_to_extended -#pragma weak decimal_to_quadruple = _decimal_to_quadruple - -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include "base_conversion.h" diff --git a/usr/src/lib/libc/port/fp/double_decim.c b/usr/src/lib/libc/port/fp/double_decim.c index d13cb41fa3..4ce29a4981 100644 --- a/usr/src/lib/libc/port/fp/double_decim.c +++ b/usr/src/lib/libc/port/fp/double_decim.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,12 +30,7 @@ * Conversion from binary to decimal floating point */ -#pragma weak single_to_decimal = _single_to_decimal -#pragma weak double_to_decimal = _double_to_decimal -#pragma weak extended_to_decimal = _extended_to_decimal -#pragma weak quadruple_to_decimal = _quadruple_to_decimal - -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include "base_conversion.h" diff --git a/usr/src/lib/libc/port/fp/econvert.c b/usr/src/lib/libc/port/fp/econvert.c index 2a7aa08894..7ef875a0f8 100644 --- a/usr/src/lib/libc/port/fp/econvert.c +++ b/usr/src/lib/libc/port/fp/econvert.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#pragma weak econvert = _econvert -#pragma weak seconvert = _seconvert -#pragma weak qeconvert = _qeconvert - -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/fp/fconvert.c b/usr/src/lib/libc/port/fp/fconvert.c index 043fc587ef..f63e35e8a5 100644 --- a/usr/src/lib/libc/port/fp/fconvert.c +++ b/usr/src/lib/libc/port/fp/fconvert.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#pragma weak fconvert = _fconvert -#pragma weak sfconvert = _sfconvert -#pragma weak qfconvert = _qfconvert - -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" #include <sys/types.h> #include "libc.h" diff --git a/usr/src/lib/libc/port/fp/file_decim.c b/usr/src/lib/libc/port/fp/file_decim.c index 1280fc9465..2c64147409 100644 --- a/usr/src/lib/libc/port/fp/file_decim.c +++ b/usr/src/lib/libc/port/fp/file_decim.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak file_to_decimal = _file_to_decimal - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/fp/finite.c b/usr/src/lib/libc/port/fp/finite.c index 574983b8c7..bd40ef1a49 100644 --- a/usr/src/lib/libc/port/fp/finite.c +++ b/usr/src/lib/libc/port/fp/finite.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* IEEE recommended functions */ -#pragma weak finite = _finite -#pragma weak fpclass = _fpclass -#pragma weak unordered = _unordered +#pragma weak _finite = finite +#pragma weak _fpclass = fpclass +#pragma weak _unordered = unordered -#include "synonyms.h" +#include "lint.h" #include <values.h> #include "fpparts.h" diff --git a/usr/src/lib/libc/port/fp/func_decim.c b/usr/src/lib/libc/port/fp/func_decim.c index bbcfe1ff25..ded6547a09 100644 --- a/usr/src/lib/libc/port/fp/func_decim.c +++ b/usr/src/lib/libc/port/fp/func_decim.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak func_to_decimal = _func_to_decimal - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <ctype.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/fp/gconvert.c b/usr/src/lib/libc/port/fp/gconvert.c index 830aed755c..9baa9ecce3 100644 --- a/usr/src/lib/libc/port/fp/gconvert.c +++ b/usr/src/lib/libc/port/fp/gconvert.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#pragma weak gconvert = _gconvert -#pragma weak sgconvert = _sgconvert -#pragma weak qgconvert = _qgconvert - -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" #include <sys/types.h> #include "libc.h" diff --git a/usr/src/lib/libc/port/fp/hex_bin.c b/usr/src/lib/libc/port/fp/hex_bin.c index 8672e0bad0..752d385b7e 100644 --- a/usr/src/lib/libc/port/fp/hex_bin.c +++ b/usr/src/lib/libc/port/fp/hex_bin.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" /* conversion from hex chars to hex values */ diff --git a/usr/src/lib/libc/port/fp/ieee_globals.c b/usr/src/lib/libc/port/fp/ieee_globals.c index 871e5e1711..e244608adf 100644 --- a/usr/src/lib/libc/port/fp/ieee_globals.c +++ b/usr/src/lib/libc/port/fp/ieee_globals.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -18,10 +17,14 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END - * - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -37,8 +40,7 @@ * modes; IEEE floating-point arithmetic exception handling; */ - -#include "synonyms.h" +#include "lint.h" #include <thread.h> #include <synch.h> #include <mtlib.h> @@ -59,25 +61,25 @@ typedef struct { #define fpvars ((fpvars_t *)tsdalloc(_T_FP_GET, sizeof (fpvars_t), NULL)) int * -_thr_get_nan_written() +_thrp_get_nan_written() { - return (_thr_main() ? &__nan_written : &fpvars->__nan_written); + return (thr_main() ? &__nan_written : &fpvars->__nan_written); } int * -_thr_get_nan_read() +_thrp_get_nan_read() { - return (_thr_main() ? &__nan_read : &fpvars->__nan_read); + return (thr_main() ? &__nan_read : &fpvars->__nan_read); } int * -_thr_get_inf_written() +_thrp_get_inf_written() { - return (_thr_main() ? &__inf_written : &fpvars->__inf_written); + return (thr_main() ? &__inf_written : &fpvars->__inf_written); } int * -_thr_get_inf_read() +_thrp_get_inf_read() { - return (_thr_main() ? &__inf_read : &fpvars->__inf_read); + return (thr_main() ? &__inf_read : &fpvars->__inf_read); } diff --git a/usr/src/lib/libc/port/fp/pack_float.c b/usr/src/lib/libc/port/fp/pack_float.c index 6e6c8f6e85..cefe6ddd34 100644 --- a/usr/src/lib/libc/port/fp/pack_float.c +++ b/usr/src/lib/libc/port/fp/pack_float.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "base_conversion.h" static void @@ -172,7 +172,7 @@ infinity: case fp_quiet: kluge.f.msw.exponent = 0xff; kluge.f.msw.significand = 0x400000 | - (0x3fffff & (pu->significand[0] >> 8)); + (0x3fffff & (pu->significand[0] >> 8)); break; case fp_normal: __fp_rightshift(pu, 8); @@ -239,7 +239,7 @@ infinity: kluge.f.msw.exponent = 0x7ff; __fp_rightshift(pu, 11); kluge.f.msw.significand = 0x80000 | - (0x7ffff & pu->significand[0]); + (0x7ffff & pu->significand[0]); kluge.f.significand2 = pu->significand[1]; break; case fp_normal: @@ -384,7 +384,7 @@ infinity: kluge.f.msw.exponent = 0x7fff; __fp_rightshift(pu, 15); kluge.f.msw.significand = 0x8000 | - (0xffff & pu->significand[0]); + (0xffff & pu->significand[0]); kluge.f.significand2 = pu->significand[1]; kluge.f.significand3 = pu->significand[2]; kluge.f.significand4 = pu->significand[3]; diff --git a/usr/src/lib/libc/port/fp/sigfpe.c b/usr/src/lib/libc/port/fp/sigfpe.c index 24eb54fc23..9ba6c6ce72 100644 --- a/usr/src/lib/libc/port/fp/sigfpe.c +++ b/usr/src/lib/libc/port/fp/sigfpe.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -18,10 +17,14 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END - * - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -34,9 +37,7 @@ /* Swap handler for SIGFPE codes. */ -#pragma weak sigfpe = _sigfpe - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <errno.h> #include <signal.h> @@ -128,7 +129,8 @@ _sigfpe_master(int sig, siginfo_t *siginfo, void *arg) lmutex_lock(&sigfpe_lock); code = siginfo->si_code; - for (i = 0; (i < N_SIGFPE_CODE) && (code != sigfpe_codes[i]); i++); + for (i = 0; (i < N_SIGFPE_CODE) && (code != sigfpe_codes[i]); i++) + continue; /* Find index of handler. */ if (i >= N_SIGFPE_CODE) i = N_SIGFPE_CODE - 1; @@ -214,7 +216,8 @@ sigfpe(sigfpe_code_type code, sigfpe_handler_type hdl) lmutex_lock(&sigfpe_lock); (void) _test_sigfpe_master(); - for (i = 0; (i < N_SIGFPE_CODE) && (code != sigfpe_codes[i]); i++); + for (i = 0; (i < N_SIGFPE_CODE) && (code != sigfpe_codes[i]); i++) + continue; /* Find index of handler. */ if (i >= N_SIGFPE_CODE) { errno = EINVAL; diff --git a/usr/src/lib/libc/port/fp/string_decim.c b/usr/src/lib/libc/port/fp/string_decim.c index ddea3bf323..1b09aef644 100644 --- a/usr/src/lib/libc/port/fp/string_decim.c +++ b/usr/src/lib/libc/port/fp/string_decim.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak string_to_decimal = _string_to_decimal - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <ctype.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/gen/_ftoll.c b/usr/src/lib/libc/port/gen/_ftoll.c index 66c6a217f0..857a52b8a1 100644 --- a/usr/src/lib/libc/port/gen/_ftoll.c +++ b/usr/src/lib/libc/port/gen/_ftoll.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/isa_defs.h> #include <floatingpoint.h> #include <limits.h> @@ -104,7 +104,7 @@ __dtoll(double dval) default: if (exp > 30) { m1 = (m0 << (exp - 30)) | - (m1 >> (62 - exp)) & ~(-1 << (exp - 30)); + (m1 >> (62 - exp)) & ~(-1 << (exp - 30)); m0 >>= 62 - exp; } else { m1 = m0 >> (30 - exp); @@ -275,7 +275,7 @@ _Q_qtoll(long double longdbl) default: if (exp > 30) { m1 = (m0 << (exp - 30)) | - (m1 >> (62 - exp)) & ~(-1 << (exp - 30)); + (m1 >> (62 - exp)) & ~(-1 << (exp - 30)); m0 >>= 62 - exp; } else { m1 = m0 >> (30 - exp); diff --git a/usr/src/lib/libc/port/gen/_ftoull.c b/usr/src/lib/libc/port/gen/_ftoull.c index a4ba2d15ec..6388c2a8da 100644 --- a/usr/src/lib/libc/port/gen/_ftoull.c +++ b/usr/src/lib/libc/port/gen/_ftoull.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/isa_defs.h> #include <floatingpoint.h> #include <limits.h> diff --git a/usr/src/lib/libc/port/gen/_libc_gettext.h b/usr/src/lib/libc/port/gen/_libc_gettext.h index b64d29b24a..b73bc6e95c 100644 --- a/usr/src/lib/libc/port/gen/_libc_gettext.h +++ b/usr/src/lib/libc/port/gen/_libc_gettext.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1990 by Sun Microsystems, Inc. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -#ident "%Z%%M% %I% %E% SMI" +#ifndef _LIBC_GETTEXT_H +#define _LIBC_GETTEXT_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <libintl.h> /* Header file for _libc_gettext() macro. */ #if !defined(TEXT_DOMAIN) /* Should be defined thru -D flag. */ -# define TEXT_DOMAIN "SYS_TEST" +#define TEXT_DOMAIN "SYS_TEST" #endif -char * _dgettext(const char *, const char *); -#define _libc_gettext(msg_id) _dgettext(TEXT_DOMAIN, msg_id) +#define _libc_gettext(msg_id) dgettext(TEXT_DOMAIN, msg_id) +#endif /* _LIBC_GETTEXT_H */ diff --git a/usr/src/lib/libc/port/gen/_xftw.c b/usr/src/lib/libc/port/gen/_xftw.c index 09e4d0017b..c30d19fac0 100644 --- a/usr/src/lib/libc/port/gen/_xftw.c +++ b/usr/src/lib/libc/port/gen/_xftw.c @@ -18,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * _xftw - file tree walk the uses expanded stat structure @@ -93,31 +93,6 @@ #undef _STYPES #endif -#include <sys/feature_tests.h> - -#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#define fstatat64 _fstatat64 -#define lstat64 _lstat64 -#define openat64 _openat64 -#define readdir64 _readdir64 -#define stat64 _stat64 -#else -#define fstatat _fstatat -#define lstat _lstat -#define openat _openat -#define readdir _readdir -#define stat _stat -#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */ - -#define close _close -#define closedir _closedir -#define fdopendir _fdopendir -#define opendir _opendir -#define seekdir _seekdir -#define strdup _strdup -#define strtok_r _strtok_r -#define telldir _telldir - #include "lint.h" #include <sys/types.h> #include <sys/stat.h> diff --git a/usr/src/lib/libc/port/gen/a64l.c b/usr/src/lib/libc/port/gen/a64l.c index d645089ecb..40c4a9eb46 100644 --- a/usr/src/lib/libc/port/gen/a64l.c +++ b/usr/src/lib/libc/port/gen/a64l.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,23 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * convert base 64 ascii to long int * char set is [./0-9A-Za-z] * */ -#pragma weak a64l = _a64l -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/abort.c b/usr/src/lib/libc/port/gen/abort.c index 0d0ef4a8e3..9d1518a458 100644 --- a/usr/src/lib/libc/port/gen/abort.c +++ b/usr/src/lib/libc/port/gen/abort.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <signal.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/addsev.c b/usr/src/lib/libc/port/gen/addsev.c index 0c3be15d20..2e47ff7a66 100644 --- a/usr/src/lib/libc/port/gen/addsev.c +++ b/usr/src/lib/libc/port/gen/addsev.c @@ -18,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak addsev = _addsev +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _addsev = addsev -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "libc.h" #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/assert.c b/usr/src/lib/libc/port/gen/assert.c index 0e915cdd98..968a4e6b6f 100644 --- a/usr/src/lib/libc/port/gen/assert.c +++ b/usr/src/lib/libc/port/gen/assert.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak _assert = __assert -#pragma weak _assert_c99 = __assert_c99 +#pragma weak __assert = _assert +#pragma weak __assert_c99 = _assert_c99 -#include "synonyms.h" +#include "lint.h" #include "_libc_gettext.h" #include <string.h> #include <stdlib.h> @@ -50,7 +49,6 @@ _assert(const char *assertion, const char *filename, int line_num) { char buf[512]; - /* LINTED variable format specifier */ (void) snprintf(buf, sizeof (buf), _libc_gettext("Assertion failed: %s, file %s, line %d\n"), assertion, filename, line_num); @@ -70,7 +68,6 @@ _assert_c99(const char *assertion, const char *filename, int line_num, { char buf[512]; - /* LINTED variable format specifier */ (void) snprintf(buf, sizeof (buf), _libc_gettext("Assertion failed: %s, file %s, line %d, \ function %s\n"), diff --git a/usr/src/lib/libc/port/gen/atexit.c b/usr/src/lib/libc/port/gen/atexit.c index 560e5852e7..a355553303 100644 --- a/usr/src/lib/libc/port/gen/atexit.c +++ b/usr/src/lib/libc/port/gen/atexit.c @@ -24,14 +24,14 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak atexit = _atexit +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _atexit = atexit -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include "libc_int.h" #include "atexit.h" @@ -95,7 +95,7 @@ atexit_unlocks() * Be careful about dereferencing self->ul_uberdata->atexit_root. */ int -_atexit(void (*func)(void)) +atexit(void (*func)(void)) { ulwp_t *self; atexit_root_t *arp; diff --git a/usr/src/lib/libc/port/gen/atfork.c b/usr/src/lib/libc/port/gen/atfork.c index 62ed20dce3..dd2c763df9 100644 --- a/usr/src/lib/libc/port/gen/atfork.c +++ b/usr/src/lib/libc/port/gen/atfork.c @@ -45,9 +45,8 @@ * handlers installed by a library are deleted when that library * is unloaded (see _preexec_atfork_unload() in atexit.c). */ -#pragma weak pthread_atfork = _pthread_atfork int -_pthread_atfork(void (*prepare)(void), +pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) { ulwp_t *self = curthread; diff --git a/usr/src/lib/libc/port/gen/atoi.c b/usr/src/lib/libc/port/gen/atoi.c index b51a0abf5e..16ffa1256d 100644 --- a/usr/src/lib/libc/port/gen/atoi.c +++ b/usr/src/lib/libc/port/gen/atoi.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <ctype.h> #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/atol.c b/usr/src/lib/libc/port/gen/atol.c index 3c1ca0a99c..e9f6aae49c 100644 --- a/usr/src/lib/libc/port/gen/atol.c +++ b/usr/src/lib/libc/port/gen/atol.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <ctype.h> #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/atoll.c b/usr/src/lib/libc/port/gen/atoll.c index fb73cd40a0..7d2539d745 100644 --- a/usr/src/lib/libc/port/gen/atoll.c +++ b/usr/src/lib/libc/port/gen/atoll.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak atoll = _atoll - -#include "synonyms.h" +#include "lint.h" #include <ctype.h> #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/attrat.c b/usr/src/lib/libc/port/gen/attrat.c index 547faa5e84..eab90989ef 100644 --- a/usr/src/lib/libc/port/gen/attrat.c +++ b/usr/src/lib/libc/port/gen/attrat.c @@ -25,7 +25,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stdlib.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/attropen.c b/usr/src/lib/libc/port/gen/attropen.c index 93ad3d1c46..46a6111dd9 100644 --- a/usr/src/lib/libc/port/gen/attropen.c +++ b/usr/src/lib/libc/port/gen/attropen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,20 +31,19 @@ */ #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#pragma weak attropen64 = _attropen64 +#pragma weak _attropen64 = attropen64 #else -#pragma weak attropen = _attropen +#pragma weak _attropen = attropen #endif -#include "synonyms.h" -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/errno.h> -#include <stdlib.h> -#include <errno.h> -#include <unistd.h> -#include <stdarg.h> +#include "lint.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <stdlib.h> +#include <errno.h> +#include <unistd.h> +#include <stdarg.h> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 @@ -64,7 +63,7 @@ attropen64(const char *file, const char *attr, int oflag, ...) } if ((attrfd = openat64(fd, attr, oflag | O_XATTR, - va_arg(ap, mode_t))) == -1) { + va_arg(ap, mode_t))) == -1) { saverrno = errno; (void) close(fd); errno = saverrno; @@ -95,7 +94,7 @@ attropen(const char *file, const char *attr, int oflag, ...) } if ((attrfd = openat(fd, attr, oflag | O_XATTR, - va_arg(ap, mode_t))) == -1) { + va_arg(ap, mode_t))) == -1) { saverrno = errno; (void) close(fd); errno = saverrno; diff --git a/usr/src/lib/libc/port/gen/basename.c b/usr/src/lib/libc/port/gen/basename.c index 00b2442253..80257d2e19 100644 --- a/usr/src/lib/libc/port/gen/basename.c +++ b/usr/src/lib/libc/port/gen/basename.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,28 +18,28 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return pointer to the last element of a pathname. */ -#pragma weak basename = _basename -#include "synonyms.h" +#pragma weak _basename = basename + +#include "lint.h" #include <libgen.h> #include <string.h> #include <sys/types.h> - char * basename(char *s) { diff --git a/usr/src/lib/libc/port/gen/calloc.c b/usr/src/lib/libc/port/gen/calloc.c index b642623d01..e9e4ad8244 100644 --- a/usr/src/lib/libc/port/gen/calloc.c +++ b/usr/src/lib/libc/port/gen/calloc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <string.h> #include <errno.h> @@ -51,8 +50,8 @@ calloc(size_t num, size_t size) /* check for overflow */ if (total / num != size) { - errno = ENOMEM; - return (0); + errno = ENOMEM; + return (0); } } return ((mp = malloc(total)) ? memset(mp, 0, total) : mp); diff --git a/usr/src/lib/libc/port/gen/catgets.c b/usr/src/lib/libc/port/gen/catgets.c index a0bdf7b9fb..d9f5a970e5 100644 --- a/usr/src/lib/libc/port/gen/catgets.c +++ b/usr/src/lib/libc/port/gen/catgets.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,16 +30,16 @@ * catgets.c */ -#pragma weak catgets = _catgets +#pragma weak _catgets = catgets -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <nl_types.h> #include <errno.h> #include "nlspath_checks.h" char * -_catgets(nl_catd catd_st, int set_id, int msg_id, const char *def_str) +catgets(nl_catd catd_st, int set_id, int msg_id, const char *def_str) { int hi, lo, mid; struct _cat_hdr *p; @@ -54,7 +54,7 @@ _catgets(nl_catd catd_st, int set_id, int msg_id, const char *def_str) } if ((catd_st->__content == NULL) && - (catd_st->__size == 0) && (catd_st->__trust == 1)) { + (catd_st->__size == 0) && (catd_st->__trust == 1)) { /* special message catalog descriptor for C locale */ return ((char *)def_str); } else if ((catd_st->__content == NULL) || (catd_st->__size == 0)) { @@ -75,33 +75,33 @@ _catgets(nl_catd catd_st, int set_id, int msg_id, const char *def_str) while (hi >= lo) { mid = (hi + lo) / 2; q = (struct _cat_set_hdr *) - ((uintptr_t)catd - + _CAT_HDR_SIZE - + _CAT_SET_HDR_SIZE * mid); + ((uintptr_t)catd + + _CAT_HDR_SIZE + + _CAT_SET_HDR_SIZE * mid); if (q->__set_no == set_id) { lo = q->__first_msg_hdr; hi = lo + q->__nmsgs - 1; while (hi >= lo) { mid = (hi + lo) / 2; r = (struct _cat_msg_hdr *) - ((uintptr_t)catd - + _CAT_HDR_SIZE - + p->__msg_hdr_offset - + _CAT_MSG_HDR_SIZE * mid); + ((uintptr_t)catd + + _CAT_HDR_SIZE + + p->__msg_hdr_offset + + _CAT_MSG_HDR_SIZE * mid); if (r->__msg_no == msg_id) { char *msg = (char *)catd - + _CAT_HDR_SIZE - + p->__msg_text_offset - + r->__msg_offset; + + _CAT_HDR_SIZE + + p->__msg_text_offset + + r->__msg_offset; if (!catd_st->__trust) { - int errno_save = errno; - char *cmsg = check_format( - def_str, msg, 0); + int errno_save = errno; + char *cmsg = check_format( + def_str, msg, 0); if (cmsg == def_str) { /* security */ return ((char *) - def_str); + def_str); } else { errno = errno_save; return (msg); diff --git a/usr/src/lib/libc/port/gen/catopen.c b/usr/src/lib/libc/port/gen/catopen.c index 1cf6a6abcb..0da2a749fa 100644 --- a/usr/src/lib/libc/port/gen/catopen.c +++ b/usr/src/lib/libc/port/gen/catopen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,10 +31,10 @@ * */ -#pragma weak catopen = _catopen -#pragma weak catclose = _catclose +#pragma weak _catopen = catopen +#pragma weak _catclose = catclose -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <sys/types.h> #include <unistd.h> @@ -58,7 +58,7 @@ static nl_catd file_open(const char *, int); static nl_catd process_nls_path(char *, int); nl_catd -_catopen(const char *name, int oflag) +catopen(const char *name, int oflag) { nl_catd p; @@ -156,7 +156,7 @@ process_nls_path(char *name, int oflag) /* replace Substitution field */ s = replace_nls_option(s, name, pathname, locale, - lang, territory, codeset); + lang, territory, codeset); p = file_open(pathname, UNSAFE_F); if (p != NULL) { @@ -246,14 +246,14 @@ replace_nls_option(char *s, char *name, char *pathname, char *locale, if (lang) { u = lang; while (*u && *u != '_' && - t < pathname + PATH_MAX) + t < pathname + PATH_MAX) *t++ = *u++; } } else if (*s == 't') { if (territory) { u = territory; while (*u && *u != '.' && - t < pathname + PATH_MAX) + t < pathname + PATH_MAX) *t++ = *u++; } } else if (*s == 'c') { @@ -320,7 +320,7 @@ file_open(const char *name, int safe) } int -_catclose(nl_catd catd) +catclose(nl_catd catd) { if (catd && catd != (nl_catd)-1) { diff --git a/usr/src/lib/libc/port/gen/cfgetispeed.c b/usr/src/lib/libc/port/gen/cfgetispeed.c index ec07ea0b36..f75e514dff 100644 --- a/usr/src/lib/libc/port/gen/cfgetispeed.c +++ b/usr/src/lib/libc/port/gen/cfgetispeed.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _cfgetispeed = cfgetispeed -#pragma weak cfgetispeed = _cfgetispeed -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/termios.h> diff --git a/usr/src/lib/libc/port/gen/cfgetospeed.c b/usr/src/lib/libc/port/gen/cfgetospeed.c index 26b714a4d8..46577a1525 100644 --- a/usr/src/lib/libc/port/gen/cfgetospeed.c +++ b/usr/src/lib/libc/port/gen/cfgetospeed.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _cfgetospeed = cfgetospeed -#pragma weak cfgetospeed = _cfgetospeed -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/termios.h> @@ -43,6 +43,6 @@ speed_t cfgetospeed(const struct termios *termios_p) { return (termios_p->c_cflag & CBAUDEXT ? - (termios_p->c_cflag & CBAUD) + CBAUD + 1 : - termios_p->c_cflag & CBAUD); + (termios_p->c_cflag & CBAUD) + CBAUD + 1 : + termios_p->c_cflag & CBAUD); } diff --git a/usr/src/lib/libc/port/gen/cfree.c b/usr/src/lib/libc/port/gen/cfree.c index a68e2b4b63..d113695cfb 100644 --- a/usr/src/lib/libc/port/gen/cfree.c +++ b/usr/src/lib/libc/port/gen/cfree.c @@ -20,21 +20,20 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * cfree - clear memory block */ -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/cfsetispeed.c b/usr/src/lib/libc/port/gen/cfsetispeed.c index 947d83d7b8..3bd1c53d0d 100644 --- a/usr/src/lib/libc/port/gen/cfsetispeed.c +++ b/usr/src/lib/libc/port/gen/cfsetispeed.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _cfsetispeed = cfsetispeed -#pragma weak cfsetispeed = _cfsetispeed -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/termios.h> diff --git a/usr/src/lib/libc/port/gen/cfsetospeed.c b/usr/src/lib/libc/port/gen/cfsetospeed.c index 5b6905cc78..578bb1f5a3 100644 --- a/usr/src/lib/libc/port/gen/cfsetospeed.c +++ b/usr/src/lib/libc/port/gen/cfsetospeed.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _cfsetospeed = cfsetospeed -#pragma weak cfsetospeed = _cfsetospeed -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/termios.h> diff --git a/usr/src/lib/libc/port/gen/cftime.c b/usr/src/lib/libc/port/gen/cftime.c index 4e93b560da..f4fa872da8 100644 --- a/usr/src/lib/libc/port/gen/cftime.c +++ b/usr/src/lib/libc/port/gen/cftime.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" /* SVr4.0 1.15 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" /* * This routine converts time as follows. The epoch is 0000 Jan 1 @@ -62,10 +61,7 @@ * */ -#pragma weak ascftime = _ascftime -#pragma weak cftime = _cftime - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stddef.h> #include <time.h> diff --git a/usr/src/lib/libc/port/gen/clock.c b/usr/src/lib/libc/port/gen/clock.c index 06dd1ca289..9ae651e6f9 100644 --- a/usr/src/lib/libc/port/gen/clock.c +++ b/usr/src/lib/libc/port/gen/clock.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/times.h> #include <time.h> diff --git a/usr/src/lib/libc/port/gen/closedir.c b/usr/src/lib/libc/port/gen/closedir.c index 780c1f3a84..ef5dbaad65 100644 --- a/usr/src/lib/libc/port/gen/closedir.c +++ b/usr/src/lib/libc/port/gen/closedir.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * closedir -- C library extension routine * @@ -37,9 +37,9 @@ * while holding internal libc locks. */ -#pragma weak closedir = _closedir +#pragma weak _closedir = closedir -#include "synonyms.h" +#include "lint.h" #include <dirent.h> #include <stdlib.h> #include <unistd.h> @@ -51,7 +51,7 @@ closedir(DIR *dirp) private_DIR *pdirp = (private_DIR *)(uintptr_t)dirp; int fd = dirp->dd_fd; - mutex_destroy(&pdirp->dd_lock); + (void) mutex_destroy(&pdirp->dd_lock); lfree(dirp->dd_buf, DIRBUF); lfree(pdirp, sizeof (*pdirp)); return (close(fd)); diff --git a/usr/src/lib/libc/port/gen/closefrom.c b/usr/src/lib/libc/port/gen/closefrom.c index 334a03de5b..315c9599cd 100644 --- a/usr/src/lib/libc/port/gen/closefrom.c +++ b/usr/src/lib/libc/port/gen/closefrom.c @@ -20,16 +20,16 @@ */ /* - * Copyright 2007 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" -#pragma weak closefrom = _closefrom -#pragma weak fdwalk = _fdwalk +#pragma weak _closefrom = closefrom +#pragma weak _fdwalk = fdwalk -#include "synonyms.h" +#include "lint.h" #include <ctype.h> #include <stdlib.h> #include <unistd.h> @@ -91,7 +91,7 @@ fdwalk(int (*func)(void *, int), void *cd) */ if (getrlimit(RLIMIT_NOFILE, &rl) == 0) max_fds = (rl.rlim_max == RLIM_INFINITY)? - INT_MAX : rl.rlim_max; + INT_MAX : rl.rlim_max; for (i = 0; i < max_fds; i++) { if (fcntl(i, F_GETFD) < 0) continue; diff --git a/usr/src/lib/libc/port/gen/confstr.c b/usr/src/lib/libc/port/gen/confstr.c index d2837ed2da..5cc2afb7f8 100644 --- a/usr/src/lib/libc/port/gen/confstr.c +++ b/usr/src/lib/libc/port/gen/confstr.c @@ -18,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" -#pragma weak confstr = _confstr +#pragma weak _confstr = confstr -#include "synonyms.h" +#include "lint.h" #include "xpg6.h" #include <sys/types.h> #include <unistd.h> @@ -101,11 +102,11 @@ confstr(int name, char *buf, size_t length) if (name == _CS_PATH) { if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) - path = "/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:"\ - "/usr/bin:/opt/SUNWspro/bin"; + path = "/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:" + "/usr/bin:/opt/SUNWspro/bin"; else - path = "/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:"\ - "/opt/SUNWspro/bin"; + path = "/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:" + "/opt/SUNWspro/bin"; conf_length = strlen(path) + 1; if (length != 0) { diff --git a/usr/src/lib/libc/port/gen/crypt.c b/usr/src/lib/libc/port/gen/crypt.c index ee77dea287..bfb859867e 100644 --- a/usr/src/lib/libc/port/gen/crypt.c +++ b/usr/src/lib/libc/port/gen/crypt.c @@ -20,17 +20,17 @@ */ /* - * Copyright 2007 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" -#pragma weak crypt = _crypt -#pragma weak encrypt = _encrypt -#pragma weak setkey = _setkey +#pragma weak _crypt = crypt +#pragma weak _encrypt = encrypt +#pragma weak _setkey = setkey -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <synch.h> #include <thread.h> @@ -504,7 +504,7 @@ getalgbyname(const char *algname, boolean_t *found) if ((configfd = open(CRYPT_CONFFILE, O_RDONLY)) == -1) { syslog(LOG_ALERT, "crypt: open(%s) failed: %s", - CRYPT_CONFFILE, strerror(errno)); + CRYPT_CONFFILE, strerror(errno)); return (NULL); } @@ -513,7 +513,7 @@ getalgbyname(const char *algname, boolean_t *found) */ if (fstat(configfd, &stb) < 0) { syslog(LOG_ALERT, "crypt: stat(%s) failed: %s", - CRYPT_CONFFILE, strerror(errno)); + CRYPT_CONFFILE, strerror(errno)); goto cleanup; } @@ -536,13 +536,13 @@ getalgbyname(const char *algname, boolean_t *found) } if (stb.st_mode & S_IWOTH) { syslog(LOG_ALERT, - "crypt: %s writable by world", CRYPT_CONFFILE); + "crypt: %s writable by world", CRYPT_CONFFILE); goto cleanup; } if ((fconf = fdopen(configfd, "rF")) == NULL) { syslog(LOG_ALERT, "crypt: fdopen(%d) failed: %s", - configfd, strerror(errno)); + configfd, strerror(errno)); goto cleanup; } @@ -1037,12 +1037,12 @@ unlocked_encrypt(char *block, int fake) preS[j] = R[E[j]-1] ^ *(KS+index+j); for (j = 0; j < 8; j++) { t = 6 * j; - k = S[j][(preS[t+0]<<5)+ - (preS[t+1]<<3)+ - (preS[t+2]<<2)+ - (preS[t+3]<<1)+ - (preS[t+4]<<0)+ - (preS[t+5]<<4)]; + k = S[j][(preS[t+0]<<5) + + (preS[t+1]<<3) + + (preS[t+2]<<2) + + (preS[t+3]<<1) + + (preS[t+4]<<0) + + (preS[t+5]<<4)]; t = 4*j; f[t+0] = (k>>3)&01; f[t+1] = (k>>2)&01; diff --git a/usr/src/lib/libc/port/gen/csetlen.c b/usr/src/lib/libc/port/gen/csetlen.c index 98633f1f16..6f306728b9 100644 --- a/usr/src/lib/libc/port/gen/csetlen.c +++ b/usr/src/lib/libc/port/gen/csetlen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <ctype.h> #include <euc.h> diff --git a/usr/src/lib/libc/port/gen/ctime.c b/usr/src/lib/libc/port/gen/ctime.c index 89f7e18f06..097ef8ee0f 100644 --- a/usr/src/lib/libc/port/gen/ctime.c +++ b/usr/src/lib/libc/port/gen/ctime.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * This routine converts time as follows. @@ -77,9 +76,7 @@ * may also be called explicitly by the user. */ -#pragma weak asctime_r = _asctime_r - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <time.h> @@ -119,7 +116,8 @@ __posix_asctime_r(const struct tm *t, char *cbuf) const char *Month = "JanFebMarAprMayJunJulAugSepOctNovDec"; cp = cbuf; - for (ncp = Date; *cp++ = *ncp++; /* */); + for (ncp = Date; *cp++ = *ncp++; /* */) + ; ncp = Day + (3 * t->tm_wday); cp = cbuf; *cp++ = *ncp++; diff --git a/usr/src/lib/libc/port/gen/ctime_r.c b/usr/src/lib/libc/port/gen/ctime_r.c index 4abcfe29d3..a57558169a 100644 --- a/usr/src/lib/libc/port/gen/ctime_r.c +++ b/usr/src/lib/libc/port/gen/ctime_r.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * This routine converts time as follows. @@ -77,9 +76,7 @@ * may also be called explicitly by the user. */ -#pragma weak ctime_r = _ctime_r - -#include "synonyms.h" +#include "lint.h" #include <time.h> #include <sys/types.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/deflt.c b/usr/src/lib/libc/port/gen/deflt.c index 24cfd281fc..716b3dd79e 100644 --- a/usr/src/lib/libc/port/gen/deflt.c +++ b/usr/src/lib/libc/port/gen/deflt.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,11 +32,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak defopen = _defopen -#pragma weak defread = _defread -#pragma weak defcntl = _defcntl - -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <stdio.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/directio.c b/usr/src/lib/libc/port/gen/directio.c index 3a76c7bb9d..f6ff4f24a6 100644 --- a/usr/src/lib/libc/port/gen/directio.c +++ b/usr/src/lib/libc/port/gen/directio.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <unistd.h> #include <sys/filio.h> diff --git a/usr/src/lib/libc/port/gen/dirname.c b/usr/src/lib/libc/port/gen/dirname.c index dbfbe11b17..46d695da72 100644 --- a/usr/src/lib/libc/port/gen/dirname.c +++ b/usr/src/lib/libc/port/gen/dirname.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return pointer to the directory name, stripping off the last @@ -36,8 +35,9 @@ * Works similar to /bin/dirname */ -#pragma weak dirname = _dirname -#include "synonyms.h" +#pragma weak _dirname = dirname + +#include "lint.h" #include <sys/types.h> #include <string.h> diff --git a/usr/src/lib/libc/port/gen/div.c b/usr/src/lib/libc/port/gen/div.c index e45512760d..b2fc79f7ed 100644 --- a/usr/src/lib/libc/port/gen/div.c +++ b/usr/src/lib/libc/port/gen/div.c @@ -1,10 +1,8 @@ /* - * Copyright 2004 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" - /* * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -41,7 +39,9 @@ * SUCH DAMAGE. */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/drand48.c b/usr/src/lib/libc/port/gen/drand48.c index 7460dec5f7..897a3b65bd 100644 --- a/usr/src/lib/libc/port/gen/drand48.c +++ b/usr/src/lib/libc/port/gen/drand48.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * drand48, etc. pseudo-random number generator @@ -47,17 +46,8 @@ * previously used (32 bit precision) are now using the int32_t * type (32 bit precision in both ILP32 and LP64 worlds). */ -#pragma weak drand48 = _drand48 -#pragma weak erand48 = _erand48 -#pragma weak lrand48 = _lrand48 -#pragma weak mrand48 = _mrand48 -#pragma weak srand48 = _srand48 -#pragma weak seed48 = _seed48 -#pragma weak lcong48 = _lcong48 -#pragma weak nrand48 = _nrand48 -#pragma weak jrand48 = _jrand48 - -#include "synonyms.h" + +#include "lint.h" #include <mtlib.h> #include <synch.h> #include <thread.h> @@ -148,13 +138,13 @@ next(void) ADDEQU(p[1], q[0], carry0); MUL(a[1], x[0], r); x[2] = LOW(carry0 + carry1 + CARRY(p[1], r[0]) + q[1] + r[1] + - a[0] * x[2] + a[1] * x[1] + a[2] * x[0]); + a[0] * x[2] + a[1] * x[1] + a[2] * x[0]); x[1] = LOW(p[1] + r[0]); x[0] = LOW(p[0]); } void -_srand48(long seedval) +srand48(long seedval) { int32_t fixseed = (int32_t)seedval; /* limit to 32 bits */ @@ -187,14 +177,14 @@ NEST(long, _nrand48_u, _lrand48_u) NEST(long, _jrand48_u, _mrand48_u) -EXPORT0(double, _drand48, _drand48_u) -EXPORT1(double, _erand48, _erand48_u) +EXPORT0(double, drand48, _drand48_u) +EXPORT1(double, erand48, _erand48_u) -EXPORT0(long, _lrand48, _lrand48_u) -EXPORT1(long, _nrand48, _nrand48_u) +EXPORT0(long, lrand48, _lrand48_u) +EXPORT1(long, nrand48, _nrand48_u) -EXPORT0(long, _mrand48, _mrand48_u) -EXPORT1(long, _jrand48, _jrand48_u) +EXPORT0(long, mrand48, _mrand48_u) +EXPORT1(long, jrand48, _jrand48_u) #ifdef DRIVER /* diff --git a/usr/src/lib/libc/port/gen/dup2.c b/usr/src/lib/libc/port/gen/dup2.c index eee3a10faa..9708d3afb3 100644 --- a/usr/src/lib/libc/port/gen/dup2.c +++ b/usr/src/lib/libc/port/gen/dup2.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _dup2 = dup2 -#pragma weak dup2 = _dup2 -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <fcntl.h> diff --git a/usr/src/lib/libc/port/gen/ecvt.c b/usr/src/lib/libc/port/gen/ecvt.c index 00e422bf3d..f6f8f37058 100644 --- a/usr/src/lib/libc/port/gen/ecvt.c +++ b/usr/src/lib/libc/port/gen/ecvt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * ecvt converts to decimal @@ -37,10 +36,11 @@ * sign is set to 0 for positive, 1 for negative * */ -#pragma weak ecvt = _ecvt -#pragma weak fcvt = _fcvt -#include "synonyms.h" +#pragma weak _ecvt = ecvt +#pragma weak _fcvt = fcvt + +#include "lint.h" #include <sys/types.h> #include <values.h> #include <nan.h> diff --git a/usr/src/lib/libc/port/gen/err.c b/usr/src/lib/libc/port/gen/err.c index 3819d4881f..016d5e0b89 100644 --- a/usr/src/lib/libc/port/gen/err.c +++ b/usr/src/lib/libc/port/gen/err.c @@ -26,16 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak err = _err -#pragma weak errx = _errx -#pragma weak verr = _verr -#pragma weak verrx = _verrx -#pragma weak warn = _warn -#pragma weak warnx = _warnx -#pragma weak vwarn = _vwarn -#pragma weak vwarnx = _vwarnx - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/errlist.awk b/usr/src/lib/libc/port/gen/errlist.awk index 5acb2148d7..13c1c8ee21 100644 --- a/usr/src/lib/libc/port/gen/errlist.awk +++ b/usr/src/lib/libc/port/gen/errlist.awk @@ -1,13 +1,9 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # # Create two files from a list of input strings; @@ -58,8 +57,8 @@ BEGIN { oldfile = "errlst.c" print "#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" >oldfile - print "#pragma weak sys_errlist = _sys_errlist\n" >oldfile - print "#include \"synonyms.h\"\n" >oldfile + print "#pragma weak _sys_errlist = sys_errlist\n" >oldfile + print "#include \"lint.h\"\n" >oldfile # We need to include the errors strings proper in the # C source for gettext; the macro C allows us to embed # them as comment. @@ -68,7 +67,7 @@ BEGIN { print "const char *sys_errlist[] = {" >oldfile print "#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" >newfile - print "#include \"synonyms.h\"" >newfile + print "#include \"lint.h\"" >newfile print "#include <sys/isa_defs.h>\n" >newfile print "#pragma weak __sys_errs = _sys_errs\n" >newfile } diff --git a/usr/src/lib/libc/port/gen/euclen.c b/usr/src/lib/libc/port/gen/euclen.c index 0328c5cffd..57aa49dd7e 100644 --- a/usr/src/lib/libc/port/gen/euclen.c +++ b/usr/src/lib/libc/port/gen/euclen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 1996 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" /* Nihon Sun Micro JLE */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" -#include <euc.h> -#include <ctype.h> +#include "lint.h" +#include <euc.h> +#include <ctype.h> /* * euccol(s) returns the screen column width of the EUC char. diff --git a/usr/src/lib/libc/port/gen/event_port.c b/usr/src/lib/libc/port/gen/event_port.c index f4eb057dec..ee8317f21e 100644 --- a/usr/src/lib/libc/port/gen/event_port.c +++ b/usr/src/lib/libc/port/gen/event_port.c @@ -20,21 +20,12 @@ */ /* - * Copyright 2006 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" -#pragma weak port_create = _port_create -#pragma weak port_associate = _port_associate -#pragma weak port_dissociate = _port_dissociate -#pragma weak port_send = _port_send -#pragma weak port_sendn = _port_sendn -#pragma weak port_get = _port_get -#pragma weak port_getn = _port_getn -#pragma weak port_alert = _port_alert - #include "lint.h" #include <sys/types.h> #include <sys/stat.h> @@ -57,7 +48,7 @@ * set to 0 and no check will be done in the kernel interface. */ int -_port_create() +port_create() { rval_t r; r.r_vals = _portfs(PORT_CREATE | PORT_SYS_NOPORT, 0, 0, 0, 0, 0); @@ -65,7 +56,7 @@ _port_create() } int -_port_associate(int port, int source, uintptr_t object, int events, void *user) +port_associate(int port, int source, uintptr_t object, int events, void *user) { rval_t r; r.r_vals = _portfs(PORT_ASSOCIATE, port, source, object, events, @@ -75,7 +66,7 @@ _port_associate(int port, int source, uintptr_t object, int events, void *user) int -_port_get(int port, port_event_t *pe, struct timespec *to) +port_get(int port, port_event_t *pe, struct timespec *to) { rval_t r; if (to) @@ -87,7 +78,7 @@ _port_get(int port, port_event_t *pe, struct timespec *to) } int -_port_getn(int port, port_event_t list[], uint_t max, uint_t *nget, +port_getn(int port, port_event_t list[], uint_t max, uint_t *nget, struct timespec *timeout) { rval_t r; @@ -110,7 +101,7 @@ _port_getn(int port, port_event_t list[], uint_t max, uint_t *nget, } int -_port_dissociate(int port, int source, uintptr_t object) +port_dissociate(int port, int source, uintptr_t object) { rval_t r; r.r_vals = _portfs(PORT_DISSOCIATE, port, source, object, 0, 0); @@ -118,7 +109,7 @@ _port_dissociate(int port, int source, uintptr_t object) } int -_port_send(int port, int events, void *user) +port_send(int port, int events, void *user) { rval_t r; r.r_vals = _portfs(PORT_SEND, port, events, (uintptr_t)user, NULL, @@ -146,7 +137,7 @@ _port_dispatch(int port, int flags, int source, int events, uintptr_t object, } int -_port_sendn(int ports[], int errors[], uint_t nent, int events, void *user) +port_sendn(int ports[], int errors[], uint_t nent, int events, void *user) { rval_t r; uint_t offset; @@ -184,7 +175,7 @@ _port_sendn(int ports[], int errors[], uint_t nent, int events, void *user) } int -_port_alert(int port, int flags, int events, void *user) +port_alert(int port, int flags, int events, void *user) { rval_t r; r.r_vals = _portfs(PORT_ALERT, port, flags, events, (uintptr_t)user, diff --git a/usr/src/lib/libc/port/gen/execvp.c b/usr/src/lib/libc/port/gen/execvp.c index 51e198048a..e46308bc1d 100644 --- a/usr/src/lib/libc/port/gen/execvp.c +++ b/usr/src/lib/libc/port/gen/execvp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,26 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * execlp(name, arg,...,0) (like execl, but does path search) * execvp(name, argv) (like execv, but does path search) */ -#pragma weak execlp = _execlp -#pragma weak execvp = _execvp -#include "synonyms.h" + +#pragma weak _execlp = execlp +#pragma weak _execvp = execvp + +#include "lint.h" #include <sys/types.h> #include <unistd.h> #include <string.h> @@ -137,7 +138,7 @@ execvp(const char *name, char *const *argv) pathstr = "/usr/sbin:/usr/ccs/bin:/usr/bin"; } else { /* XPG4 (CSPATH + /usr/sbin) */ pathstr = "/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:" - "/opt/SUNWspro/bin:/usr/sbin"; + "/opt/SUNWspro/bin:/usr/sbin"; } } else { if (__xpg4 == 0) { /* not XPG4 */ diff --git a/usr/src/lib/libc/port/gen/fattach.c b/usr/src/lib/libc/port/gen/fattach.c index 4c1b497325..a56df22291 100644 --- a/usr/src/lib/libc/port/gen/fattach.c +++ b/usr/src/lib/libc/port/gen/fattach.c @@ -18,23 +18,25 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Attach a STREAMS or door based file descriptor to an object in the file * system name space. */ -#pragma weak fattach = _fattach -#include "synonyms.h" + +#pragma weak _fattach = fattach + +#include "lint.h" #include <sys/types.h> #include <errno.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/gen/fdetach.c b/usr/src/lib/libc/port/gen/fdetach.c index b1dba8f528..726803ea83 100644 --- a/usr/src/lib/libc/port/gen/fdetach.c +++ b/usr/src/lib/libc/port/gen/fdetach.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,25 +18,25 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Detach a STREAMS-based file descriptor from an object in the * file system name space. */ +#pragma weak _fdetach = fdetach -#pragma weak fdetach = _fdetach -#include "synonyms.h" +#include "lint.h" #include <sys/mount.h> int diff --git a/usr/src/lib/libc/port/gen/fdopendir.c b/usr/src/lib/libc/port/gen/fdopendir.c index 344c3af2be..0569b372c6 100644 --- a/usr/src/lib/libc/port/gen/fdopendir.c +++ b/usr/src/lib/libc/port/gen/fdopendir.c @@ -34,10 +34,9 @@ * while holding internal libc locks. */ -#pragma weak fdopendir = _fdopendir -#pragma weak dirfd = _dirfd +#pragma weak _fdopendir = fdopendir -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <dirent.h> #include <sys/stat.h> diff --git a/usr/src/lib/libc/port/gen/fmtmsg.c b/usr/src/lib/libc/port/gen/fmtmsg.c index 50a0fdbabb..08ada435ce 100644 --- a/usr/src/lib/libc/port/gen/fmtmsg.c +++ b/usr/src/lib/libc/port/gen/fmtmsg.c @@ -18,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * fmtmsg.c @@ -51,9 +51,10 @@ * <stdlib.h> miscellaneous function declarations */ -#pragma weak fmtmsg = _fmtmsg -#pragma weak addseverity = _addseverity -#include "synonyms.h" +#pragma weak _fmtmsg = fmtmsg +#pragma weak _addseverity = addseverity + +#include "lint.h" #include "mtlib.h" #include "libc.h" #include <sys/types.h> @@ -456,7 +457,7 @@ getauxsevs(char *ptr) */ if (*(tokend = - exttok(current, ":")) == ':') { + exttok(current, ":")) == ':') { *tokend = '\0'; leftoff = tokend + (ptrdiff_t)1; diff --git a/usr/src/lib/libc/port/gen/ftime.c b/usr/src/lib/libc/port/gen/ftime.c index fd124995f1..71012abe25 100644 --- a/usr/src/lib/libc/port/gen/ftime.c +++ b/usr/src/lib/libc/port/gen/ftime.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/timeb.h> diff --git a/usr/src/lib/libc/port/gen/ftok.c b/usr/src/lib/libc/port/gen/ftok.c index fd73a717b9..8eaeadf53f 100644 --- a/usr/src/lib/libc/port/gen/ftok.c +++ b/usr/src/lib/libc/port/gen/ftok.c @@ -18,19 +18,20 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _ftok = ftok -#pragma weak ftok = _ftok -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <sys/types.h> #include <sys/stat.h> diff --git a/usr/src/lib/libc/port/gen/ftw.c b/usr/src/lib/libc/port/gen/ftw.c index 34eade9780..6b7aee9261 100644 --- a/usr/src/lib/libc/port/gen/ftw.c +++ b/usr/src/lib/libc/port/gen/ftw.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include <sys/feature_tests.h> +#pragma ident "%Z%%M% %I% %E% SMI" -#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#pragma weak ftw64 = _ftw64 -#define _ftw _ftw64 -#else -#pragma weak ftw = _ftw -#endif +#include <sys/feature_tests.h> #include "lint.h" #include <mtlib.h> @@ -50,8 +43,18 @@ #include <thread.h> #include <synch.h> +#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 +#undef ftw +#undef ftw64 +#define ftw ftw64 +#pragma weak _ftw64 = ftw64 +#else +#undef ftw +#pragma weak _ftw = ftw +#endif + int -_ftw(const char *path, int (*fn)(), int depth) +ftw(const char *path, int (*fn)(), int depth) { return (_xftw(_XFTWVER, path, fn, depth)); } diff --git a/usr/src/lib/libc/port/gen/gcvt.c b/usr/src/lib/libc/port/gen/gcvt.c index 81eaa235d4..830884db14 100644 --- a/usr/src/lib/libc/port/gen/gcvt.c +++ b/usr/src/lib/libc/port/gen/gcvt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * gcvt - Floating output conversion to a pleasant-looking string. */ -#pragma weak gcvt = _gcvt +#pragma weak _gcvt = gcvt -#include "synonyms.h" +#include "lint.h" #include <floatingpoint.h> char * diff --git a/usr/src/lib/libc/port/gen/getauxv.c b/usr/src/lib/libc/port/gen/getauxv.c index 270c21f955..500675719c 100644 --- a/usr/src/lib/libc/port/gen/getauxv.c +++ b/usr/src/lib/libc/port/gen/getauxv.c @@ -20,13 +20,13 @@ */ /* - * Copyright 2007 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" -#include "synonyms.h" +#include "lint.h" #include <libc.h> #include <fcntl.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/getcwd.c b/usr/src/lib/libc/port/gen/getcwd.c index aa55033301..d832d798d7 100644 --- a/usr/src/lib/libc/port/gen/getcwd.c +++ b/usr/src/lib/libc/port/gen/getcwd.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,9 +31,9 @@ * On error, a NULL pointer is returned and errno is set. */ -#pragma weak getcwd = _getcwd +#pragma weak _getcwd = getcwd -#include "synonyms.h" +#include "lint.h" #include <sys/syscall.h> #include <sys/types.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/getdate_err.c b/usr/src/lib/libc/port/gen/getdate_err.c index 2a3b33adff..08df100fc7 100644 --- a/usr/src/lib/libc/port/gen/getdate_err.c +++ b/usr/src/lib/libc/port/gen/getdate_err.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,28 +18,30 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak getdate_err = _getdate_err +#pragma weak _getdate_err = getdate_err -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <time.h> #include <thread.h> #include <libc.h> #include "tsd.h" -int _getdate_err = 0; +#undef getdate_err +int getdate_err = 0; int * _getdate_err_addr(void) { - if (_thr_main()) - return (&_getdate_err); + if (thr_main()) + return (&getdate_err); return ((int *)tsdalloc(_T_GETDATE_ERR_ADDR, sizeof (int), NULL)); } diff --git a/usr/src/lib/libc/port/gen/getdtblsize.c b/usr/src/lib/libc/port/gen/getdtblsize.c index 56958579d2..905d779603 100644 --- a/usr/src/lib/libc/port/gen/getdtblsize.c +++ b/usr/src/lib/libc/port/gen/getdtblsize.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -33,7 +35,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/time.h> #include <sys/resource.h> diff --git a/usr/src/lib/libc/port/gen/getenv.c b/usr/src/lib/libc/port/gen/getenv.c index 6329a048d8..f9fb28ef72 100644 --- a/usr/src/lib/libc/port/gen/getenv.c +++ b/usr/src/lib/libc/port/gen/getenv.c @@ -20,23 +20,19 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak putenv = _putenv -#pragma weak setenv = _setenv -#pragma weak unsetenv = _unsetenv +#pragma weak _putenv = putenv -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> - #include <sys/types.h> #include <thread.h> #include <synch.h> diff --git a/usr/src/lib/libc/port/gen/getexecname.c b/usr/src/lib/libc/port/gen/getexecname.c index 879db6fbd9..51bb81e49b 100644 --- a/usr/src/lib/libc/port/gen/getexecname.c +++ b/usr/src/lib/libc/port/gen/getexecname.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -/*LINTLIBRARY*/ - -#pragma weak getexecname = _getexecname -#include "synonyms.h" +#pragma weak _getexecname = getexecname +#include "lint.h" #include <stdlib.h> #include <unistd.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/getgrnam.c b/usr/src/lib/libc/port/gen/getgrnam.c index 5080bd2ac0..1d907976f3 100644 --- a/usr/src/lib/libc/port/gen/getgrnam.c +++ b/usr/src/lib/libc/port/gen/getgrnam.c @@ -18,25 +18,21 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -/* 3.0 SID # 1.2 */ - -#pragma weak getgrnam = _getgrnam -#pragma weak getgrgid = _getgrgid -#pragma weak getgrent = _getgrent -#pragma weak fgetgrent = _fgetgrent +#pragma weak _getgrnam = getgrnam +#pragma weak _getgrgid = getgrgid -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <grp.h> #include <nss_dbdefs.h> diff --git a/usr/src/lib/libc/port/gen/getgrnam_r.c b/usr/src/lib/libc/port/gen/getgrnam_r.c index ab41c50bac..52e1b6d0e7 100644 --- a/usr/src/lib/libc/port/gen/getgrnam_r.c +++ b/usr/src/lib/libc/port/gen/getgrnam_r.c @@ -20,21 +20,13 @@ */ /* - * Copyright 2007 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" -#pragma weak endgrent = _endgrent -#pragma weak setgrent = _setgrent - -#pragma weak getgrnam_r = _getgrnam_r -#pragma weak getgrgid_r = _getgrgid_r -#pragma weak getgrent_r = _getgrent_r -#pragma weak fgetgrent_r = _fgetgrent_r - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <grp.h> @@ -79,7 +71,7 @@ _uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen); * It was implemented by Solaris 2.3. */ struct group * -_getgrnam_r(const char *name, struct group *result, char *buffer, int buflen) +getgrnam_r(const char *name, struct group *result, char *buffer, int buflen) { nss_XbyY_args_t arg; @@ -90,7 +82,7 @@ _getgrnam_r(const char *name, struct group *result, char *buffer, int buflen) NSS_XbyY_INIT(&arg, result, buffer, buflen, str2group); arg.key.name = name; (void) nss_search(&db_root, _nss_initf_group, - NSS_DBOP_GROUP_BYNAME, &arg); + NSS_DBOP_GROUP_BYNAME, &arg); return ((struct group *)NSS_XbyY_FINI(&arg)); } @@ -99,14 +91,14 @@ _getgrnam_r(const char *name, struct group *result, char *buffer, int buflen) * It was implemented by Solaris 2.3. */ struct group * -_getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen) +getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen) { nss_XbyY_args_t arg; NSS_XbyY_INIT(&arg, result, buffer, buflen, str2group); arg.key.gid = gid; (void) nss_search(&db_root, _nss_initf_group, - NSS_DBOP_GROUP_BYGID, &arg); + NSS_DBOP_GROUP_BYGID, &arg); return ((struct group *)NSS_XbyY_FINI(&arg)); } @@ -119,7 +111,7 @@ _uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, NSS_XbyY_INIT(&arg, result, buffer, buflen, str2group); arg.key.gid = gid; (void) nss_search(&db_root, _nss_initf_group, - NSS_DBOP_GROUP_BYGID, &arg); + NSS_DBOP_GROUP_BYGID, &arg); return ((struct group *)NSS_XbyY_FINI(&arg)); } @@ -135,18 +127,14 @@ __posix_getgrgid_r(gid_t gid, struct group *grp, char *buffer, int oerrno = errno; errno = 0; - if ((*result = _getgrgid_r(gid, grp, buffer, (uintptr_t)bufsize)) - == NULL) { + if ((*result = getgrgid_r(gid, grp, buffer, (uintptr_t)bufsize)) + == NULL) { nerrno = errno; } errno = oerrno; return (nerrno); } -extern struct group * -_getgrnam_r(const char *name, struct group *result, char *buffer, - int buflen); - struct group * _uncached_getgrnam_r(const char *name, struct group *result, char *buffer, int buflen) @@ -156,7 +144,7 @@ _uncached_getgrnam_r(const char *name, struct group *result, char *buffer, NSS_XbyY_INIT(&arg, result, buffer, buflen, str2group); arg.key.name = name; (void) nss_search(&db_root, _nss_initf_group, - NSS_DBOP_GROUP_BYNAME, &arg); + NSS_DBOP_GROUP_BYNAME, &arg); return ((struct group *)NSS_XbyY_FINI(&arg)); } @@ -171,8 +159,8 @@ __posix_getgrnam_r(const char *name, struct group *grp, char *buffer, int nerrno = 0; int oerrno = errno; - if ((*result = _getgrnam_r(name, grp, buffer, (uintptr_t)bufsize)) - == NULL) { + if ((*result = getgrnam_r(name, grp, buffer, (uintptr_t)bufsize)) + == NULL) { nerrno = errno; } errno = oerrno; @@ -205,8 +193,8 @@ getgrent_r(struct group *result, char *buffer, int buflen) /* No key to fill in */ (void) nss_getent(&db_root, _nss_initf_group, &context, &arg); } while (arg.returnval != 0 && - (nam = ((struct group *)arg.returnval)->gr_name) != 0 && - (*nam == '+' || *nam == '-')); + (nam = ((struct group *)arg.returnval)->gr_name) != 0 && + (*nam == '+' || *nam == '-')); return ((struct group *)NSS_XbyY_FINI(&arg)); } @@ -289,7 +277,7 @@ _getgroupsbymember(const char *username, gid_t gid_array[], } (void) nss_search(&db_root, _nss_initf_group, - NSS_DBOP_GROUP_BYMEMBER, &arg); + NSS_DBOP_GROUP_BYMEMBER, &arg); return (arg.numgids); } @@ -445,7 +433,7 @@ process_cstr(const char *instr, int instr_len, struct nss_groupsbymem *gbm) grp = (struct group *)buf->result; parsestat = (*gbm->str2ent)(instr, instr_len, - grp, buf->buffer, buf->buflen); + grp, buf->buffer, buf->buflen); if (parsestat != NSS_STR_PARSE_SUCCESS) { _nss_XbyY_buf_free(buf); @@ -454,7 +442,7 @@ process_cstr(const char *instr, int instr_len, struct nss_groupsbymem *gbm) if (grp->gr_mem) { for (memp = grp->gr_mem; (memp) && ((mem = *memp) != 0); - memp++) { + memp++) { if (strcmp(mem, username) == 0) { gid_t gid = grp->gr_gid; gid_t *gidp = gbm->gid_array; @@ -464,7 +452,7 @@ process_cstr(const char *instr, int instr_len, struct nss_groupsbymem *gbm) _nss_XbyY_buf_free(buf); for (i = 0; i < numgids && *gidp != gid; i++, - gidp++) { + gidp++) { ; } if (i >= numgids) { diff --git a/usr/src/lib/libc/port/gen/gethostid.c b/usr/src/lib/libc/port/gen/gethostid.c index 7f22539f94..3cf2a3eeab 100644 --- a/usr/src/lib/libc/port/gen/gethostid.c +++ b/usr/src/lib/libc/port/gen/gethostid.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +34,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/systeminfo.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/gethostname.c b/usr/src/lib/libc/port/gen/gethostname.c index d16b21431c..6484d79afc 100644 --- a/usr/src/lib/libc/port/gen/gethostname.c +++ b/usr/src/lib/libc/port/gen/gethostname.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +34,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/systeminfo.h> diff --git a/usr/src/lib/libc/port/gen/gethz.c b/usr/src/lib/libc/port/gen/gethz.c index b44d282a4d..9579d5bcd3 100644 --- a/usr/src/lib/libc/port/gen/gethz.c +++ b/usr/src/lib/libc/port/gen/gethz.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak gethz = _gethz +#pragma weak _gethz = gethz -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <ctype.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/getisax.c b/usr/src/lib/libc/port/gen/getisax.c index 17d426d80e..db0d171412 100644 --- a/usr/src/lib/libc/port/gen/getisax.c +++ b/usr/src/lib/libc/port/gen/getisax.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -/*LINTLIBRARY*/ - -#pragma weak getisax = _getisax -#include "synonyms.h" +#pragma weak _getisax = getisax +#include "lint.h" #include <sys/types.h> #include <sys/auxv.h> diff --git a/usr/src/lib/libc/port/gen/getloadavg.c b/usr/src/lib/libc/port/gen/getloadavg.c index cdba031256..a230e34c1e 100644 --- a/usr/src/lib/libc/port/gen/getloadavg.c +++ b/usr/src/lib/libc/port/gen/getloadavg.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak getloadavg = _getloadavg +#pragma weak _getloadavg = getloadavg -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/param.h> -#include <sys/syscall.h> #include <sys/loadavg.h> -#include <stdio.h> -#include <stdlib.h> /* * getloadavg -- get the time averaged run queues from the system @@ -42,6 +39,8 @@ int getloadavg(double loadavg[], int nelem) { + extern int __getloadavg(int *buf, int nelem); + int i, buf[LOADAVG_NSTATS]; if (nelem > LOADAVG_NSTATS) diff --git a/usr/src/lib/libc/port/gen/getlogin.c b/usr/src/lib/libc/port/gen/getlogin.c index 58c5b1f483..a3d7b4cf3b 100644 --- a/usr/src/lib/libc/port/gen/getlogin.c +++ b/usr/src/lib/libc/port/gen/getlogin.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getlogin = _getlogin -#pragma weak getlogin_r = _getlogin_r +#pragma weak _getlogin = getlogin +#pragma weak _getlogin_r = getlogin_r -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -59,7 +58,7 @@ * It was implemented by Solaris 2.3. */ char * -_getlogin_r(char *answer, int namelen) +getlogin_r(char *answer, int namelen) { int uf; off64_t me; @@ -99,7 +98,7 @@ __posix_getlogin_r(char *name, int namelen) int oerrno = errno; errno = 0; - if (_getlogin_r(name, namelen) == NULL) { + if (getlogin_r(name, namelen) == NULL) { if (errno == 0) nerrno = EINVAL; else @@ -116,5 +115,5 @@ getlogin(void) if (answer == NULL) return (NULL); - return (_getlogin_r(answer, _POSIX_LOGIN_NAME_MAX)); + return (getlogin_r(answer, _POSIX_LOGIN_NAME_MAX)); } diff --git a/usr/src/lib/libc/port/gen/getmntent.c b/usr/src/lib/libc/port/gen/getmntent.c index eba9c4de10..94e2d0cc84 100644 --- a/usr/src/lib/libc/port/gen/getmntent.c +++ b/usr/src/lib/libc/port/gen/getmntent.c @@ -20,23 +20,16 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getmntany = _getmntany -#pragma weak getmntent = _getmntent -#pragma weak getextmntent = _getextmntent -#pragma weak resetmnttab = _resetmnttab -#pragma weak hasmntopt = _hasmntopt - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdio.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/getnetgrent.c b/usr/src/lib/libc/port/gen/getnetgrent.c index 8a8e7373c2..f201250de6 100644 --- a/usr/src/lib/libc/port/gen/getnetgrent.c +++ b/usr/src/lib/libc/port/gen/getnetgrent.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -47,7 +47,7 @@ * count of zero. */ -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <synch.h> #include <nss_dbdefs.h> diff --git a/usr/src/lib/libc/port/gen/getopt.c b/usr/src/lib/libc/port/gen/getopt.c index e2cb47c5d2..5e3e3e23eb 100644 --- a/usr/src/lib/libc/port/gen/getopt.c +++ b/usr/src/lib/libc/port/gen/getopt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * See getopt(3C) and SUS/XPG getopt() for function definition and @@ -39,9 +39,9 @@ * alnum characters ([a-z][A-Z][0-9]). */ -#pragma weak getopt = _getopt +#pragma weak _getopt = getopt -#include "synonyms.h" +#include "lint.h" #include "_libc_gettext.h" #include <unistd.h> @@ -149,10 +149,10 @@ parselong(const char *optstring, const char *opt, char **longoptarg) if (match && *ip == ')' && (*op == '\0' || *op == '=')) { if ((*op) == '=') { - /* may be an empty string - OK */ - (*longoptarg) = op + 1; + /* may be an empty string - OK */ + (*longoptarg) = op + 1; } else { - (*longoptarg) = NULL; + (*longoptarg) = NULL; } return (cp); } @@ -166,7 +166,7 @@ parselong(const char *optstring, const char *opt, char **longoptarg) * required argument. */ while ((cp > optstring) && ((*cp) == ':')) { - --cp; + --cp; } } while (*cp != '\0'); return (NULL); @@ -230,7 +230,6 @@ getopt(int argc, char *const *argv, const char *optstring) if (!(longopt ? ((cp = parselong(optstring, argv[optind]+2, &longoptarg)) != NULL) : ((cp = parseshort(optstring, c)) != NULL))) { - /* LINTED: variable format specifier */ ERR(_libc_gettext("%s: illegal option -- %s\n"), c, (longopt ? optind : 0)); /* @@ -281,7 +280,6 @@ getopt(int argc, char *const *argv, const char *optstring) optind++; optarg = longoptarg; } else if (++optind >= argc) { - /* LINTED: variable format specifier */ ERR(_libc_gettext("%s: option requires an argument" \ " -- %s\n"), c, (longopt ? optind - 1 : 0)); _sp = 1; @@ -293,13 +291,12 @@ getopt(int argc, char *const *argv, const char *optstring) } else { /* The option does NOT take an argument */ if (longopt && (longoptarg != NULL)) { - /* User supplied an arg to an option that takes none */ - /* LINTED: variable format specifier */ - ERR(_libc_gettext( - "%s: option doesn't take an argument -- %s\n"), - 0, (longopt ? optind : 0)); - optarg = longoptarg = NULL; - c = '?'; + /* User supplied an arg to an option that takes none */ + ERR(_libc_gettext( + "%s: option doesn't take an argument -- %s\n"), + 0, (longopt ? optind : 0)); + optarg = longoptarg = NULL; + c = '?'; } if (longopt || argv[optind][++_sp] == '\0') { diff --git a/usr/src/lib/libc/port/gen/getopt_long.c b/usr/src/lib/libc/port/gen/getopt_long.c index 1db2f1f150..ca55a7870b 100644 --- a/usr/src/lib/libc/port/gen/getopt_long.c +++ b/usr/src/lib/libc/port/gen/getopt_long.c @@ -1,10 +1,8 @@ /* - * Copyright 2007 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" - /* * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com> * All rights reserved. @@ -67,18 +65,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#pragma weak getopt_clip = _getopt_clip -#pragma weak getopt_long = _getopt_long -#pragma weak getopt_long_only = _getopt_long_only +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#pragma weak _getopt_clip = getopt_clip +#pragma weak _getopt_long = getopt_long +#pragma weak _getopt_long_only = getopt_long_only + +#include "lint.h" #include <getopt.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> #include <string.h> - #include "_libc_gettext.h" static int optreset = 0; /* keep track of first entry to getopt() */ diff --git a/usr/src/lib/libc/port/gen/getpagesize.c b/usr/src/lib/libc/port/gen/getpagesize.c index ffc9c01f2f..c63ffc663b 100644 --- a/usr/src/lib/libc/port/gen/getpagesize.c +++ b/usr/src/lib/libc/port/gen/getpagesize.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -33,7 +35,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <unistd.h> /* diff --git a/usr/src/lib/libc/port/gen/getpw.c b/usr/src/lib/libc/port/gen/getpw.c index 9155894497..629312f91e 100644 --- a/usr/src/lib/libc/port/gen/getpw.c +++ b/usr/src/lib/libc/port/gen/getpw.c @@ -18,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -/* 3.0 SID # 1.2 */ -#pragma weak getpw = _getpw - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <sys/types.h> #include <mtlib.h> diff --git a/usr/src/lib/libc/port/gen/getpwnam.c b/usr/src/lib/libc/port/gen/getpwnam.c index 7a3b8c4b37..d04d63190a 100644 --- a/usr/src/lib/libc/port/gen/getpwnam.c +++ b/usr/src/lib/libc/port/gen/getpwnam.c @@ -18,23 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getpwnam = _getpwnam -#pragma weak getpwuid = _getpwuid -#pragma weak getpwent = _getpwent -#pragma weak fgetpwent = _fgetpwent +#pragma weak _getpwnam = getpwnam +#pragma weak _getpwuid = getpwuid -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <pwd.h> #include <nss_dbdefs.h> diff --git a/usr/src/lib/libc/port/gen/getpwnam_r.c b/usr/src/lib/libc/port/gen/getpwnam_r.c index 21d1c3c7e5..7ff4d21f0d 100644 --- a/usr/src/lib/libc/port/gen/getpwnam_r.c +++ b/usr/src/lib/libc/port/gen/getpwnam_r.c @@ -18,21 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#pragma weak endpwent = _endpwent -#pragma weak setpwent = _setpwent -#pragma weak getpwnam_r = _getpwnam_r -#pragma weak getpwuid_r = _getpwuid_r -#pragma weak getpwent_r = _getpwent_r -#pragma weak fgetpwent_r = _fgetpwent_r - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <pwd.h> #include <nss_dbdefs.h> @@ -71,7 +65,7 @@ _uncached_getpwnam_r(const char *name, struct passwd *result, char *buffer, * It was implemented by Solaris 2.3. */ struct passwd * -_getpwnam_r(const char *name, struct passwd *result, char *buffer, int buflen) +getpwnam_r(const char *name, struct passwd *result, char *buffer, int buflen) { nss_XbyY_args_t arg; @@ -82,7 +76,7 @@ _getpwnam_r(const char *name, struct passwd *result, char *buffer, int buflen) NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); arg.key.name = name; (void) nss_search(&db_root, _nss_initf_passwd, NSS_DBOP_PASSWD_BYNAME, - &arg); + &arg); return ((struct passwd *)NSS_XbyY_FINI(&arg)); } @@ -91,14 +85,14 @@ _getpwnam_r(const char *name, struct passwd *result, char *buffer, int buflen) * It was implemented by Solaris 2.3. */ struct passwd * -_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, int buflen) +getpwuid_r(uid_t uid, struct passwd *result, char *buffer, int buflen) { nss_XbyY_args_t arg; NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); arg.key.uid = uid; (void) nss_search(&db_root, _nss_initf_passwd, NSS_DBOP_PASSWD_BYUID, - &arg); + &arg); return ((struct passwd *)NSS_XbyY_FINI(&arg)); } @@ -112,7 +106,7 @@ _uncached_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); arg.key.uid = uid; (void) nss_search(&db_root, _nss_initf_passwd, NSS_DBOP_PASSWD_BYUID, - &arg); + &arg); return ((struct passwd *)NSS_XbyY_FINI(&arg)); } @@ -129,8 +123,8 @@ __posix_getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, int oerrno = errno; errno = 0; - if ((*result = _getpwuid_r(uid, pwd, buffer, (uintptr_t)bufsize)) - == NULL) { + if ((*result = getpwuid_r(uid, pwd, buffer, (uintptr_t)bufsize)) + == NULL) { nerrno = errno; } errno = oerrno; @@ -146,7 +140,7 @@ _uncached_getpwnam_r(const char *name, struct passwd *result, char *buffer, NSS_XbyY_INIT(&arg, result, buffer, buflen, str2passwd); arg.key.name = name; (void) nss_search(&db_root, _nss_initf_passwd, NSS_DBOP_PASSWD_BYNAME, - &arg); + &arg); return ((struct passwd *)NSS_XbyY_FINI(&arg)); } @@ -162,8 +156,8 @@ __posix_getpwnam_r(const char *name, struct passwd *pwd, char *buffer, int oerrno = errno; errno = 0; - if ((*result = _getpwnam_r(name, pwd, buffer, (uintptr_t)bufsize)) - == NULL) { + if ((*result = getpwnam_r(name, pwd, buffer, (uintptr_t)bufsize)) + == NULL) { nerrno = errno; } errno = oerrno; @@ -197,7 +191,7 @@ getpwent_r(struct passwd *result, char *buffer, int buflen) (void) nss_getent(&db_root, _nss_initf_passwd, &context, &arg); } while (arg.returnval != 0 && (nam = ((struct passwd *)arg.returnval)->pw_name) != 0 && - (*nam == '+' || *nam == '-')); + (*nam == '+' || *nam == '-')); return ((struct passwd *)NSS_XbyY_FINI(&arg)); } diff --git a/usr/src/lib/libc/port/gen/getrusage.c b/usr/src/lib/libc/port/gen/getrusage.c index efeaf0be24..cb0fb3f695 100644 --- a/usr/src/lib/libc/port/gen/getrusage.c +++ b/usr/src/lib/libc/port/gen/getrusage.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,14 +34,13 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" - /* * Compatibility lib for BSD's getrusgae(). Only the * CPU time usage is supported for RUSAGE_CHILDREN, and hence does not * fully support BSD's rusage semantics. */ +#include "lint.h" #include <sys/types.h> #include <sys/time.h> #include <sys/times.h> diff --git a/usr/src/lib/libc/port/gen/getspent.c b/usr/src/lib/libc/port/gen/getspent.c index cb1472dce1..044c19b9c9 100644 --- a/usr/src/lib/libc/port/gen/getspent.c +++ b/usr/src/lib/libc/port/gen/getspent.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getspent = _getspent -#pragma weak getspnam = _getspnam -#pragma weak fgetspent = _fgetspent - /* putspent() has been moved to putspent.c */ - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <shadow.h> #include <nss_dbdefs.h> diff --git a/usr/src/lib/libc/port/gen/getspent_r.c b/usr/src/lib/libc/port/gen/getspent_r.c index 78c42b7b62..d1edf7e9be 100644 --- a/usr/src/lib/libc/port/gen/getspent_r.c +++ b/usr/src/lib/libc/port/gen/getspent_r.c @@ -18,20 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" -#pragma weak setspent = _setspent -#pragma weak endspent = _endspent -#pragma weak getspnam_r = _getspnam_r -#pragma weak getspent_r = _getspent_r -#pragma weak fgetspent_r = _fgetspent_r - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <shadow.h> @@ -62,8 +57,8 @@ getspnam_r(const char *name, struct spwd *result, char *buffer, int buflen) NSS_XbyY_INIT(&arg, result, buffer, buflen, str2spwd); arg.key.name = name; - (void) nss_search(&db_root, _nss_initf_shadow, \ - NSS_DBOP_SHADOW_BYNAME, &arg); + (void) nss_search(&db_root, _nss_initf_shadow, + NSS_DBOP_SHADOW_BYNAME, &arg); return ((struct spwd *)NSS_XbyY_FINI(&arg)); } @@ -93,8 +88,8 @@ getspent_r(struct spwd *result, char *buffer, int buflen) /* No key to fill in */ (void) nss_getent(&db_root, _nss_initf_shadow, &context, &arg); } while (arg.returnval != 0 && - (nam = ((struct spwd *)arg.returnval)->sp_namp) != 0 && - (*nam == '+' || *nam == '-')); + (nam = ((struct spwd *)arg.returnval)->sp_namp) != 0 && + (*nam == '+' || *nam == '-')); return (struct spwd *)NSS_XbyY_FINI(&arg); } @@ -192,8 +187,8 @@ str2spwd(const char *instr, int lenstr, void *ent, char *buffer, int buflen) limit = p + lenstr; if ((p = memchr(instr, ':', lenstr)) == 0 || - ++p >= limit || - (p = memchr(p, ':', limit - p)) == 0) { + ++p >= limit || + (p = memchr(p, ':', limit - p)) == 0) { lencopy = (size_t)lenstr; p = 0; } else { diff --git a/usr/src/lib/libc/port/gen/getsubopt.c b/usr/src/lib/libc/port/gen/getsubopt.c index e1516b7de0..466319b718 100644 --- a/usr/src/lib/libc/port/gen/getsubopt.c +++ b/usr/src/lib/libc/port/gen/getsubopt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,9 +32,9 @@ /* * getsubopt - parse suboptions from a flag argument. */ -#pragma weak getsubopt = _getsubopt +#pragma weak _getsubopt = getsubopt -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <string.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/gettxt.c b/usr/src/lib/libc/port/gen/gettxt.c index 2399f92f89..88e0b5b72c 100644 --- a/usr/src/lib/libc/port/gen/gettxt.c +++ b/usr/src/lib/libc/port/gen/gettxt.c @@ -20,19 +20,18 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak gettxt = _gettxt +#pragma weak _gettxt = gettxt -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <mtlib.h> #include <ctype.h> diff --git a/usr/src/lib/libc/port/gen/getusershell.c b/usr/src/lib/libc/port/gen/getusershell.c index a8fb5d97e5..368fa72a61 100644 --- a/usr/src/lib/libc/port/gen/getusershell.c +++ b/usr/src/lib/libc/port/gen/getusershell.c @@ -1,21 +1,20 @@ /* - * Copyright 2007 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" - /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - /* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <sys/types.h> #include <sys/param.h> #include <sys/stat.h> diff --git a/usr/src/lib/libc/port/gen/getut.c b/usr/src/lib/libc/port/gen/getut.c index e60a041b23..798e6d69d0 100644 --- a/usr/src/lib/libc/port/gen/getut.c +++ b/usr/src/lib/libc/port/gen/getut.c @@ -18,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Compatibility routines to read and write alternate @@ -40,7 +40,7 @@ * equivalent function operating on utmpx-like files. */ -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <sys/param.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/getutx.c b/usr/src/lib/libc/port/gen/getutx.c index fe0da52342..c755b12266 100644 --- a/usr/src/lib/libc/port/gen/getutx.c +++ b/usr/src/lib/libc/port/gen/getutx.c @@ -45,30 +45,7 @@ * on systems with MAXPID <= SHRT_MAX. */ -#pragma weak getutxent = _getutxent -#pragma weak getutent = _getutent -#pragma weak getutxid = _getutxid -#pragma weak getutid = _getutid -#pragma weak getutxline = _getutxline -#pragma weak getutline = _getutline -#pragma weak getutmpx = _getutmpx -#pragma weak getutmp = _getutmp -#pragma weak makeutx = _makeutx -#pragma weak makeut = _makeut -#pragma weak modutx = _modutx -#pragma weak modut = _modut -#pragma weak pututxline = _pututxline -#pragma weak pututline = _pututline -#pragma weak setutxent = _setutxent -#pragma weak setutent = _setutent -#pragma weak endutxent = _endutxent -#pragma weak endutent = _endutent -#pragma weak utmpxname = _utmpxname -#pragma weak utmpname = _utmpname -#pragma weak updwtmpx = _updwtmpx -#pragma weak updwtmp = _updwtmp - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdio.h> #include <sys/param.h> diff --git a/usr/src/lib/libc/port/gen/getvfsent.c b/usr/src/lib/libc/port/gen/getvfsent.c index 4de8f7574d..bf6cf11c1a 100644 --- a/usr/src/lib/libc/port/gen/getvfsent.c +++ b/usr/src/lib/libc/port/gen/getvfsent.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getvfsspec = _getvfsspec -#pragma weak getvfsfile = _getvfsfile -#pragma weak getvfsany = _getvfsany -#pragma weak getvfsent = _getvfsent - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdio.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/getwd.c b/usr/src/lib/libc/port/gen/getwd.c index 9474e9a82f..6b6baf82c6 100644 --- a/usr/src/lib/libc/port/gen/getwd.c +++ b/usr/src/lib/libc/port/gen/getwd.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" - +#include "lint.h" #include <sys/types.h> #include <sys/param.h> #include <errno.h> @@ -49,7 +48,7 @@ getwd(char *pathname) if ((c = getcwd(pathname, val)) == NULL) { if (errno == EACCES) (void) strcpy(pathname, - "getwd: a parent directory cannot be read"); + "getwd: a parent directory cannot be read"); else if (errno == ERANGE) (void) strcpy(pathname, "getwd: buffer too small"); else diff --git a/usr/src/lib/libc/port/gen/getwidth.c b/usr/src/lib/libc/port/gen/getwidth.c index 0e74f74fce..fe91801a5b 100644 --- a/usr/src/lib/libc/port/gen/getwidth.c +++ b/usr/src/lib/libc/port/gen/getwidth.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <ctype.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/getxby_door.c b/usr/src/lib/libc/port/gen/getxby_door.c index c30ad8c231..e98bf317ef 100644 --- a/usr/src/lib/libc/port/gen/getxby_door.c +++ b/usr/src/lib/libc/port/gen/getxby_door.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/gtxt.c b/usr/src/lib/libc/port/gen/gtxt.c index 145743bdd8..80936415dc 100644 --- a/usr/src/lib/libc/port/gen/gtxt.c +++ b/usr/src/lib/libc/port/gen/gtxt.c @@ -18,22 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* __gtxt(): Common part to gettxt() and pfmt() */ -#pragma weak setcat = _setcat +#pragma weak _setcat = setcat -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <mtlib.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/hsearch.c b/usr/src/lib/libc/port/gen/hsearch.c index 2773b48809..6a04ae0743 100644 --- a/usr/src/lib/libc/port/gen/hsearch.c +++ b/usr/src/lib/libc/port/gen/hsearch.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Compile time switches: @@ -46,11 +45,11 @@ * USCR - user supplied comparison routine. */ -#pragma weak hcreate = _hcreate -#pragma weak hdestroy = _hdestroy -#pragma weak hsearch = _hsearch +#pragma weak _hcreate = hcreate +#pragma weak _hdestroy = hdestroy +#pragma weak _hsearch = hsearch -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <limits.h> #include <stdio.h> @@ -172,29 +171,29 @@ start: #endif new = (ENTRY *) malloc(sizeof (ENTRY)); if (new == NULL) { - fprintf(stderr, "Out of core \n"); - exit(FAIL); - } else { - new->key = malloc((unsigned)strlen(line) + 1); - if (new->key == NULL) { fprintf(stderr, "Out of core \n"); exit(FAIL); - } - strcpy(new->key, line); - new->data = malloc(sizeof (int)); - if (new->data == NULL) { - fprintf(stderr, "Out of core \n"); - exit(FAIL); - } - *new->data = i++; + } else { + new->key = malloc((unsigned)strlen(line) + 1); + if (new->key == NULL) { + fprintf(stderr, "Out of core \n"); + exit(FAIL); + } + strcpy(new->key, line); + new->data = malloc(sizeof (int)); + if (new->data == NULL) { + fprintf(stderr, "Out of core \n"); + exit(FAIL); + } + *new->data = i++; } res = hsearch(*new, ENTER); printf("The number of probes required was %d\n", prcnt); if (res == (ENTRY *) 0) - printf("Table is full\n"); + printf("Table is full\n"); else { - printf("Success: "); - printf("Key = %s, Value = %d\n", res->key, *res->data); + printf("Success: "); + printf("Key = %s, Value = %d\n", res->key, *res->data); } } printf("Do you wish to start another hash table (yes/no?)"); @@ -556,19 +555,19 @@ hdump() /* Dumps loc, data, probe count, key */ hsearch(table[i], FIND); sum += prcnt; printf("%o.\t%d,\t%d,\t%s\n", i, - *table[i].data, prcnt, table[i].key); + *table[i].data, prcnt, table[i].key); prcnt = oldpr; } printf("Total probes = %d\n", sum); #else #ifdef CHAINED if (table[i] == NULL) - printf("%o.\t-,\t-,\t(NULL)\n", i); + printf("%o.\t-,\t-,\t(NULL)\n", i); else { - printf("%o.", i); - for (a = table[i]; a != NULL; a = a->next) - printf("\t%d,\t%#0.4x,\t%s\n", - *a->item.data, a, a->item.key); + printf("%o.", i); + for (a = table[i]; a != NULL; a = a->next) + printf("\t%d,\t%#0.4x,\t%s\n", + *a->item.data, a, a->item.key); } #endif #endif diff --git a/usr/src/lib/libc/port/gen/iconv.c b/usr/src/lib/libc/port/gen/iconv.c index d3fc6e9cfd..b9fc9ce598 100644 --- a/usr/src/lib/libc/port/gen/iconv.c +++ b/usr/src/lib/libc/port/gen/iconv.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak iconv_open = _iconv_open -#pragma weak iconv_close = _iconv_close -#pragma weak iconv = _iconv - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> @@ -63,7 +59,7 @@ static iconv_p iconv_search_alias(const char *, const char *, char *); */ iconv_t -_iconv_open(const char *tocode, const char *fromcode) +iconv_open(const char *tocode, const char *fromcode) { iconv_t cd; char *ipath; @@ -124,13 +120,13 @@ search_alias(char **paddr, size_t size, const char *variant) } /* skip leading spaces */ while ((q > p) && - ((*p == ' ') || (*p == '\t'))) + ((*p == ' ') || (*p == '\t'))) p++; if (q <= p) break; sp = p; while ((q > p) && (*p != ' ') && - (*p != '\t') && (*p != '\n')) + (*p != '\t') && (*p != '\n')) p++; if (q <= p) { /* invalid entry */ @@ -143,8 +139,8 @@ search_alias(char **paddr, size_t size, const char *variant) } if (((p - sp) != var_len) || - ((strncmp(sp, variant, var_len) != 0) && - (strncasecmp(sp, variant, var_len) != 0))) { + ((strncmp(sp, variant, var_len) != 0) && + (strncasecmp(sp, variant, var_len) != 0))) { /* * didn't match */ @@ -160,13 +156,13 @@ search_alias(char **paddr, size_t size, const char *variant) /* skip spaces */ while ((q > p) && - ((*p == ' ') || (*p == '\t'))) + ((*p == ' ') || (*p == '\t'))) p++; if (q <= p) break; sp = p; while ((q > p) && (*p != ' ') && - (*p != '\t') && (*p != '\n')) + (*p != '\t') && (*p != '\n')) p++; can_len = p - sp; if (can_len == 0) { @@ -304,7 +300,7 @@ iconv_open_private(const char *lib, const char *tbl) /* gets address of _icv_open */ if ((fptr = (iconv_t(*)(const char *))dlsym(cdpath->_icv_handle, - "_icv_open")) == NULL) { + "_icv_open")) == NULL) { (void) dlclose(cdpath->_icv_handle); free(cdpath); /* dlsym does not define errno */ @@ -318,8 +314,8 @@ iconv_open_private(const char *lib, const char *tbl) */ if ((cdpath->_icv_iconv = (size_t(*)(iconv_t, const char **, - size_t *, char **, size_t *))dlsym(cdpath->_icv_handle, - "_icv_iconv")) == NULL) { + size_t *, char **, size_t *))dlsym(cdpath->_icv_handle, + "_icv_iconv")) == NULL) { (void) dlclose(cdpath->_icv_handle); free(cdpath); /* dlsym does not define errno */ @@ -332,7 +328,7 @@ iconv_open_private(const char *lib, const char *tbl) * and stores it in cd->_icv_close */ if ((cdpath->_icv_close = (void(*)(iconv_t))dlsym(cdpath->_icv_handle, - "_icv_close")) == NULL) { + "_icv_close")) == NULL) { (void) dlclose(cdpath->_icv_handle); free(cdpath); /* dlsym does not define errno */ @@ -343,7 +339,7 @@ iconv_open_private(const char *lib, const char *tbl) /* * initialize the state of the actual _icv_iconv conversion routine * For the normal iconv module, NULL will be passed as an argument - * although the _iconv_open() of the module won't use that. + * although the iconv_open() of the module won't use that. */ cdpath->_icv_state = (void *)(*fptr)(tbl); @@ -359,7 +355,7 @@ iconv_open_private(const char *lib, const char *tbl) } int -_iconv_close(iconv_t cd) +iconv_close(iconv_t cd) { if (cd == NULL) { errno = EBADF; @@ -373,7 +369,7 @@ _iconv_close(iconv_t cd) } size_t -_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, +iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { /* check if cd is valid */ @@ -384,5 +380,5 @@ _iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, /* direct conversion */ return ((*(cd->_conv)->_icv_iconv)(cd->_conv->_icv_state, - inbuf, inbytesleft, outbuf, outbytesleft)); + inbuf, inbytesleft, outbuf, outbytesleft)); } diff --git a/usr/src/lib/libc/port/gen/imaxabs.c b/usr/src/lib/libc/port/gen/imaxabs.c index 6beaca4796..9652f1aa27 100644 --- a/usr/src/lib/libc/port/gen/imaxabs.c +++ b/usr/src/lib/libc/port/gen/imaxabs.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/index.c b/usr/src/lib/libc/port/gen/index.c index 3a21c1eb7b..d8ab6a79f6 100644 --- a/usr/src/lib/libc/port/gen/index.c +++ b/usr/src/lib/libc/port/gen/index.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <string.h> diff --git a/usr/src/lib/libc/port/gen/initgroups.c b/usr/src/lib/libc/port/gen/initgroups.c index 82be7bb739..29e63e6e53 100644 --- a/usr/src/lib/libc/port/gen/initgroups.c +++ b/usr/src/lib/libc/port/gen/initgroups.c @@ -18,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak initgroups = _initgroups +#pragma weak _initgroups = initgroups -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <errno.h> #include <grp.h> @@ -68,7 +68,7 @@ initgroups(const char *uname, gid_t agroup) groups[0] = agroup; ngroups = _getgroupsbymember(uname, groups, (int)ngroups_max, - (agroup <= MAXUID) ? 1 : 0); + (agroup <= MAXUID) ? 1 : 0); if (ngroups < 0) { /* XXX -- man page does not define a value for errno in */ /* this case. Should be looked into sometime. */ diff --git a/usr/src/lib/libc/port/gen/insque.c b/usr/src/lib/libc/port/gen/insque.c index f42c4e0fb9..586faf4274 100644 --- a/usr/src/lib/libc/port/gen/insque.c +++ b/usr/src/lib/libc/port/gen/insque.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * insque() and remque() insert or remove an element from a queue. @@ -38,10 +37,10 @@ * of the structure points to the previous element in the queue. */ -#pragma weak insque = _insque -#pragma weak remque = _remque +#pragma weak _insque = insque +#pragma weak _remque = remque -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdlib.h> #include <search.h> @@ -81,8 +80,8 @@ remque(void *elem) ((struct qelem *)elem)->q_back->q_forw = NULL; } else { /* The middle element is removed. */ ((struct qelem *)elem)->q_back->q_forw = - ((struct qelem *)elem)->q_forw; + ((struct qelem *)elem)->q_forw; ((struct qelem *)elem)->q_forw->q_back = - ((struct qelem *)elem)->q_back; + ((struct qelem *)elem)->q_back; } } diff --git a/usr/src/lib/libc/port/gen/isaexec.c b/usr/src/lib/libc/port/gen/isaexec.c index 3f34dadf17..9939b695f6 100644 --- a/usr/src/lib/libc/port/gen/isaexec.c +++ b/usr/src/lib/libc/port/gen/isaexec.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak isaexec = _isaexec -#include "synonyms.h" +#pragma weak _isaexec = isaexec +#include "lint.h" #include <sys/types.h> #include <sys/systeminfo.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/isastream.c b/usr/src/lib/libc/port/gen/isastream.c index 3402224896..34c9d390d7 100644 --- a/usr/src/lib/libc/port/gen/isastream.c +++ b/usr/src/lib/libc/port/gen/isastream.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Check to see if a file descriptor is that of a stream. @@ -38,9 +37,9 @@ * */ -#pragma weak isastream = _isastream +#pragma weak _isastream = isastream -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdio.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/isatty.c b/usr/src/lib/libc/port/gen/isatty.c index fdd4d1ae58..b54bc29077 100644 --- a/usr/src/lib/libc/port/gen/isatty.c +++ b/usr/src/lib/libc/port/gen/isatty.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak isatty = _isatty +#pragma weak _isatty = isatty -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/termio.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/killpg.c b/usr/src/lib/libc/port/gen/killpg.c index 414c660c0c..493dfe7012 100644 --- a/usr/src/lib/libc/port/gen/killpg.c +++ b/usr/src/lib/libc/port/gen/killpg.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +34,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/gen/klpdlib.c b/usr/src/lib/libc/port/gen/klpdlib.c index db0403c950..4b1042bcc3 100644 --- a/usr/src/lib/libc/port/gen/klpdlib.c +++ b/usr/src/lib/libc/port/gen/klpdlib.c @@ -26,12 +26,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" - +#include "lint.h" #include "priv_private.h" #include "mtlib.h" #include "libc.h" - #include <door.h> #include <errno.h> #include <priv.h> diff --git a/usr/src/lib/libc/port/gen/l3.c b/usr/src/lib/libc/port/gen/l3.c index df5219a5d8..05a43717cc 100644 --- a/usr/src/lib/libc/port/gen/l3.c +++ b/usr/src/lib/libc/port/gen/l3.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Convert longs to and from 3-byte disk addresses */ -#pragma weak l3tol = _l3tol -#pragma weak ltol3 = _ltol3 +#pragma weak _l3tol = l3tol +#pragma weak _ltol3 = ltol3 -#include "synonyms.h" +#include "lint.h" void ltol3(char *cp, const long *lp, int n) diff --git a/usr/src/lib/libc/port/gen/l64a.c b/usr/src/lib/libc/port/gen/l64a.c index 2a1da592e7..140cee8ad3 100644 --- a/usr/src/lib/libc/port/gen/l64a.c +++ b/usr/src/lib/libc/port/gen/l64a.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * convert long int to base 64 ascii @@ -38,9 +37,7 @@ * */ -#pragma weak l64a = _l64a - -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "libc.h" #include <values.h> @@ -80,7 +77,7 @@ l64a(long value) /* fill high-order CHAR if negative */ /* but suppress sign propagation */ lg = ((lg < 0) ? (lg >> BITSPERCHAR) | SIGN : - lg >> BITSPERCHAR) & WORDMASK; + lg >> BITSPERCHAR) & WORDMASK; } *s = '\0'; return (buf); diff --git a/usr/src/lib/libc/port/gen/lckpwdf.c b/usr/src/lib/libc/port/gen/lckpwdf.c index ae1682c0b8..030660d107 100644 --- a/usr/src/lib/libc/port/gen/lckpwdf.c +++ b/usr/src/lib/libc/port/gen/lckpwdf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak lckpwdf = _lckpwdf -#pragma weak ulckpwdf = _ulckpwdf - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdio.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/gen/lconstants.c b/usr/src/lib/libc/port/gen/lconstants.c index 21fe9f7a39..a08d0c0da8 100644 --- a/usr/src/lib/libc/port/gen/lconstants.c +++ b/usr/src/lib/libc/port/gen/lconstants.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak lzero = _lzero -#pragma weak lone = _lone -#pragma weak lten = _lten +#pragma weak _lzero = lzero +#pragma weak _lone = lone +#pragma weak _lten = lten -#include "synonyms.h" -#include <sys/types.h> -#include <sys/dl.h> +#include "lint.h" +#include <sys/types.h> +#include <sys/dl.h> dl_t lzero = {0, 0}; dl_t lone = {0, 1}; diff --git a/usr/src/lib/libc/port/gen/ldivide.c b/usr/src/lib/libc/port/gen/ldivide.c index e7bbef1d9d..bf6c3d0146 100644 --- a/usr/src/lib/libc/port/gen/ldivide.c +++ b/usr/src/lib/libc/port/gen/ldivide.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak ldivide = _ldivide -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/dl.h> #include "libc.h" diff --git a/usr/src/lib/libc/sparcv9/gen/lexp10.c b/usr/src/lib/libc/port/gen/lexp10.c index 28152a5b8f..d394c11b66 100644 --- a/usr/src/lib/libc/sparcv9/gen/lexp10.c +++ b/usr/src/lib/libc/port/gen/lexp10.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak lexp10 = _lexp10 - -#include "synonyms.h" -#include <sys/types.h> -#include <sys/dl.h> +#include "lint.h" +#include <sys/types.h> +#include <sys/dl.h> dl_t lexp10(dl_t exp) { - dl_t result; + dl_t result; result = lone; while (exp.dl_hop != 0 || exp.dl_lop != 0) { result = lmul(result, lten); - exp = lsub(exp, lone); + exp = lsub(exp, lone); } return (result); diff --git a/usr/src/lib/libc/port/gen/lfind.c b/usr/src/lib/libc/port/gen/lfind.c index a449ff6ebc..699f4a3441 100644 --- a/usr/src/lib/libc/port/gen/lfind.c +++ b/usr/src/lib/libc/port/gen/lfind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Linear search algorithm, generalized from Knuth (6.1) Algorithm Q. @@ -42,9 +41,9 @@ * Actually, it has now reverted to Algorithm S, which is "simpler." */ -#pragma weak lfind = _lfind +#pragma weak _lfind = lfind -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <mtlib.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/lfmt.c b/usr/src/lib/libc/port/gen/lfmt.c index 51faa67105..87bebe6c6e 100644 --- a/usr/src/lib/libc/port/gen/lfmt.c +++ b/usr/src/lib/libc/port/gen/lfmt.c @@ -18,22 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* lfmt() - format, print and log */ -#pragma weak lfmt = _lfmt +#pragma weak _lfmt = lfmt -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include "mtlib.h" #include <pfmt.h> diff --git a/usr/src/lib/libc/port/gen/lfmt_log.c b/usr/src/lib/libc/port/gen/lfmt_log.c index 6d73e4366b..e08162ee0d 100644 --- a/usr/src/lib/libc/port/gen/lfmt_log.c +++ b/usr/src/lib/libc/port/gen/lfmt_log.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* lfmt_log() - log info */ -#include "synonyms.h" + +#include "lint.h" #include <mtlib.h> #include <pfmt.h> #include <stdio.h> @@ -91,8 +91,8 @@ __lfmt_log(const char *text, const char *sev, va_list args, long flag, int ret) msg.buf[msg_offset++] = '\0'; if (fd == -1 && - ((fd = open(LOGNAME, O_WRONLY)) == -1 || - fcntl(fd, F_SETFD, 1) == -1)) + ((fd = open(LOGNAME, O_WRONLY)) == -1 || + fcntl(fd, F_SETFD, 1) == -1)) return (-2); dat.maxlen = MAXMSG; @@ -124,7 +124,7 @@ __lfmt_log(const char *text, const char *sev, va_list args, long flag, int ret) *p = ':'; (void) write(fdd, buf, strlen(buf)); (void) write(fdd, msg.buf + sizeof (long), - msg_offset - sizeof (long)); + msg_offset - sizeof (long)); (void) write(fdd, "\n", 1); } else return (-2); diff --git a/usr/src/lib/libc/port/gen/llabs.c b/usr/src/lib/libc/port/gen/llabs.c index 0fb831508f..75dd92c863 100644 --- a/usr/src/lib/libc/port/gen/llabs.c +++ b/usr/src/lib/libc/port/gen/llabs.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak llabs = _llabs - -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/lldiv.c b/usr/src/lib/libc/port/gen/lldiv.c index c6f2e1564a..c9dc80eff0 100644 --- a/usr/src/lib/libc/port/gen/lldiv.c +++ b/usr/src/lib/libc/port/gen/lldiv.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak lldiv = _lldiv -#pragma weak __imax_lldiv = _lldiv +#pragma weak __imax_lldiv = lldiv -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/sparcv9/gen/llog10.c b/usr/src/lib/libc/port/gen/llog10.c index 14f690c61b..f06ad17546 100644 --- a/usr/src/lib/libc/sparcv9/gen/llog10.c +++ b/usr/src/lib/libc/port/gen/llog10.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak llog10 = _llog10 - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/dl.h> diff --git a/usr/src/lib/libc/port/gen/lltostr.c b/usr/src/lib/libc/port/gen/lltostr.c index d522cb6231..ea81d603f0 100644 --- a/usr/src/lib/libc/port/gen/lltostr.c +++ b/usr/src/lib/libc/port/gen/lltostr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * lltostr -- convert long long to decimal string @@ -49,10 +48,10 @@ * zero digit is produced if "value" is zero. */ -#pragma weak lltostr = _lltostr -#pragma weak ulltostr = _ulltostr +#pragma weak _lltostr = lltostr +#pragma weak _ulltostr = ulltostr -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/lmath.c b/usr/src/lib/libc/port/gen/lmath.c index cb657ac7a8..64d1313c47 100644 --- a/usr/src/lib/libc/port/gen/lmath.c +++ b/usr/src/lib/libc/port/gen/lmath.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * This set of routines used to be implemented mostly in assembler. @@ -38,13 +37,7 @@ * a C implementation seems quite adequate and much more maintainable. */ -#pragma weak ladd = _ladd -#pragma weak lsub = _lsub -#pragma weak lshiftl = _lshiftl -#pragma weak lsign = _lsign -#pragma weak lmul = _lmul - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/dl.h> diff --git a/usr/src/lib/libc/port/gen/localtime.c b/usr/src/lib/libc/port/gen/localtime.c index 6ebeaf6ad5..9d406227cb 100644 --- a/usr/src/lib/libc/port/gen/localtime.c +++ b/usr/src/lib/libc/port/gen/localtime.c @@ -20,22 +20,21 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* * A part of this file comes from public domain source, so * clarified as of June 5, 1996 by Arthur David Olson * (arthur_david_olson@nih.gov). */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * localtime.c * @@ -87,11 +86,9 @@ * Functions that are common to ctime(3C) and cftime(3C) */ -#pragma weak tzset = _tzset -#pragma weak localtime_r = _localtime_r -#pragma weak gmtime_r = _gmtime_r +#pragma weak _tzset = tzset -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include "tsd.h" #include <stdarg.h> @@ -462,7 +459,7 @@ difftime(time_t time1, time_t time0) * See ctime(3C) */ struct tm * -_gmtime_r(const time_t *timep, struct tm *p_tm) +gmtime_r(const time_t *timep, struct tm *p_tm) { return (offtime_u((time_t)*timep, 0L, p_tm)); } @@ -486,7 +483,7 @@ gmtime(const time_t *timep) if (p_tm == NULL) /* memory allocation failure */ p_tm = &tm; /* use static buffer and hope for the best */ - return (_gmtime_r(timep, p_tm)); + return (gmtime_r(timep, p_tm)); } /* @@ -585,7 +582,7 @@ find_zone(const char *zonename, state_t ***link_prev, state_t **link_next) * See ctime(3C) */ struct tm * -_localtime_r(const time_t *timep, struct tm *p_tm) +localtime_r(const time_t *timep, struct tm *p_tm) { long offset; struct tm *rt; @@ -637,7 +634,7 @@ localtime(const time_t *timep) if (p_tm == NULL) /* memory allocation failure */ p_tm = &tm; /* use static buffer and hope for the best */ - return (_localtime_r(timep, p_tm)); + return (localtime_r(timep, p_tm)); } /* @@ -787,7 +784,7 @@ mktime(struct tm *tmptr) * are updated. See ctime(3C) manpage. */ void -_tzset(void) +tzset(void) { systemtz_t stz; systemtz_t *tzp; diff --git a/usr/src/lib/libc/port/gen/lsearch.c b/usr/src/lib/libc/port/gen/lsearch.c index c780ae5231..7347f6c008 100644 --- a/usr/src/lib/libc/port/gen/lsearch.c +++ b/usr/src/lib/libc/port/gen/lsearch.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Linear search algorithm, generalized from Knuth (6.1) Algorithm Q. @@ -42,9 +41,9 @@ * Actually, it has now reverted to Algorithm S, which is "simpler." */ -#pragma weak lsearch = _lsearch +#pragma weak _lsearch = lsearch -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <stddef.h> diff --git a/usr/src/lib/libc/port/gen/madvise.c b/usr/src/lib/libc/port/gen/madvise.c index 4e03d21fd9..240c750ab6 100644 --- a/usr/src/lib/libc/port/gen/madvise.c +++ b/usr/src/lib/libc/port/gen/madvise.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak madvise = _madvise - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/gen/malloc.c b/usr/src/lib/libc/port/gen/malloc.c index 14592dd468..4973aed792 100644 --- a/usr/src/lib/libc/port/gen/malloc.c +++ b/usr/src/lib/libc/port/gen/malloc.c @@ -24,11 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Memory management: malloc(), realloc(), free(). * @@ -60,7 +60,7 @@ * Otherwise, it is always 0. */ -#include "synonyms.h" +#include "lint.h" #include "mallint.h" #include "mtlib.h" diff --git a/usr/src/lib/libc/port/gen/memalign.c b/usr/src/lib/libc/port/gen/memalign.c index 91519da222..a54a10868f 100644 --- a/usr/src/lib/libc/port/gen/memalign.c +++ b/usr/src/lib/libc/port/gen/memalign.c @@ -24,12 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include "mallint.h" #include "mtlib.h" diff --git a/usr/src/lib/libc/port/gen/mkdev.c b/usr/src/lib/libc/port/gen/mkdev.c index 018ab1a3b8..fe804e49f3 100644 --- a/usr/src/lib/libc/port/gen/mkdev.c +++ b/usr/src/lib/libc/port/gen/mkdev.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mkdev.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/mkdtemp.c b/usr/src/lib/libc/port/gen/mkdtemp.c index 9f6abff070..37e60c2b96 100644 --- a/usr/src/lib/libc/port/gen/mkdtemp.c +++ b/usr/src/lib/libc/port/gen/mkdtemp.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,10 +30,7 @@ * mkdtemp(3C) - create a directory with a unique name. */ -#pragma weak mkdtemp = _mkdtemp - -#include "synonyms.h" - +#include "lint.h" #include <alloca.h> #include <errno.h> #include <stdlib.h> @@ -48,7 +45,7 @@ mkdtemp(char *template) /* Save template */ (void) strcpy(t, template); - for (; ; ) { + for (;;) { r = mktemp(template); if (*r == '\0') diff --git a/usr/src/lib/libc/port/gen/mkfifo.c b/usr/src/lib/libc/port/gen/mkfifo.c index a11e085968..eb73e03184 100644 --- a/usr/src/lib/libc/port/gen/mkfifo.c +++ b/usr/src/lib/libc/port/gen/mkfifo.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * mkfifo(3c) - create a named pipe (FIFO). This code provides @@ -36,9 +35,9 @@ * */ -#pragma weak mkfifo = _mkfifo +#pragma weak _mkfifo = mkfifo -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/stat.h> diff --git a/usr/src/lib/libc/port/gen/mkstemp.c b/usr/src/lib/libc/port/gen/mkstemp.c index 368319201b..72c79ac47f 100644 --- a/usr/src/lib/libc/port/gen/mkstemp.c +++ b/usr/src/lib/libc/port/gen/mkstemp.c @@ -18,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved * @@ -35,17 +38,15 @@ #include <sys/feature_tests.h> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#pragma weak mkstemp64 = _mkstemp64 -#pragma weak mkstemps64 = _mkstemps64 -#define _mkstemp _mkstemp64 -#define _mkstemps _mkstemps64 +#define mkstemp mkstemp64 +#define mkstemps mkstemps64 #define libc_mkstemps libc_mkstemps64 /* prefer unique statics */ +#pragma weak _mkstemp64 = mkstemp64 #else -#pragma weak mkstemp = _mkstemp -#pragma weak mkstemps = _mkstemps +#pragma weak _mkstemp = mkstemp #endif -#include "synonyms.h" +#include "lint.h" #include <sys/fcntl.h> #include <stdlib.h> #include <string.h> @@ -82,7 +83,7 @@ libc_mkstemps(char *as, int slen) * name is used then keep trying until you find a free filename. */ - for (; ; ) { + for (;;) { if (*str == 'X') { /* If no trailing X's don't call mktemp. */ mkret = libc_mktemps(as, slen); if (*mkret == '\0') { @@ -113,13 +114,13 @@ libc_mkstemps(char *as, int slen) } int -_mkstemp(char *as) +mkstemp(char *as) { return (libc_mkstemps(as, 0)); } int -_mkstemps(char *as, int slen) +mkstemps(char *as, int slen) { return (libc_mkstemps(as, slen)); } diff --git a/usr/src/lib/libc/port/gen/mktemp.c b/usr/src/lib/libc/port/gen/mktemp.c index ff6c5b6be8..e8e7105d39 100644 --- a/usr/src/lib/libc/port/gen/mktemp.c +++ b/usr/src/lib/libc/port/gen/mktemp.c @@ -18,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * mktemp() expects a string with up to six trailing 'X's. @@ -67,10 +67,11 @@ * sequence number is randomized using the current time. */ +#pragma weak _mktemp = mktemp + #define XCNT 6 -#pragma weak mktemp = _mktemp -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <string.h> diff --git a/usr/src/lib/libc/port/gen/mlock.c b/usr/src/lib/libc/port/gen/mlock.c index 6c7d2272e5..10f641dd9d 100644 --- a/usr/src/lib/libc/port/gen/mlock.c +++ b/usr/src/lib/libc/port/gen/mlock.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak mlock = _mlock +#pragma weak _mlock = mlock -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/gen/mlockall.c b/usr/src/lib/libc/port/gen/mlockall.c index ea4ba6db4e..56a4f8ba54 100644 --- a/usr/src/lib/libc/port/gen/mlockall.c +++ b/usr/src/lib/libc/port/gen/mlockall.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak mlockall = _mlockall - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> @@ -43,6 +40,5 @@ int mlockall(int flags) { - return (memcntl(0, 0, MC_LOCKAS, (caddr_t)(uintptr_t)flags, 0, 0)); } diff --git a/usr/src/lib/libc/port/gen/mon.c b/usr/src/lib/libc/port/gen/mon.c index 04046133c5..010fc3f1e0 100644 --- a/usr/src/lib/libc/port/gen/mon.c +++ b/usr/src/lib/libc/port/gen/mon.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -48,7 +48,7 @@ * * * Routines: - * (global) _monitor init, cleanup for prof(1)iling + * (global) monitor init, cleanup for prof(1)iling * (global) _mcount function call counter * (global) _mcount_newent call count entry manager * (static) _mnewblock call count block allocator @@ -123,9 +123,9 @@ * */ -#pragma weak monitor = _monitor +#pragma weak _monitor = monitor -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "libc.h" #include <sys/types.h> @@ -158,7 +158,7 @@ char **___Argv = NULL; /* initialized to argv array by mcrt0 (if loaded) */ * countbase/countlimit are now STATIC! */ static char *countbase; /* addr of next pc,count cell to use in block */ -static char *_countlimit; /* addr lim for cells (addr after last cell) */ +static char *countlimit; /* addr lim for cells (addr after last cell) */ typedef struct anchor ANCHOR; @@ -275,7 +275,7 @@ monitor(int (*alowpc)(void), int (*ahighpc)(void), WORD *buffer, for (; ; n /= 10) { *name++ = pid/n + '0'; if (n == 1) - break; + break; pid %= n; } *name++ = '.'; @@ -316,11 +316,11 @@ monitor(int (*alowpc)(void), int (*ahighpc)(void), WORD *buffer, /* got it - enable use by mcount() */ countbase = (char *)buffer + sizeof (struct hdr); - _countlimit = countbase + (nfunc * sizeof (struct cnt)); + countlimit = countbase + (nfunc * sizeof (struct cnt)); /* (set size of region 3) */ newanchp->histSize = (int) - (bufsize * sizeof (WORD) - (_countlimit - (char *)buffer)); + (bufsize * sizeof (WORD) - (countlimit - (char *)buffer)); /* done w/regions 1 + 2: setup 3 to activate profil processing. */ @@ -474,7 +474,7 @@ _mnewblock(void) /* got it - enable use by mcount() */ countbase = (char *)hdrp + sizeof (struct hdr); - _countlimit = countbase + (THISMANYFCNS * sizeof (struct cnt)); + countlimit = countbase + (THISMANYFCNS * sizeof (struct cnt)); newanchp->histSize = 0; /* (set size of region 3.. to 0) */ @@ -486,7 +486,7 @@ _mnewblock(void) * mcount_newent() -- call to get a new mcount call count entry. * * this function is called by _mcount to get a new call count entry - * (struct cnt, in the region allocated by _monitor()), or to return + * (struct cnt, in the region allocated by monitor()), or to return * zero if profiling is off. * * This function acts as a funnel, an access function to make sure @@ -543,7 +543,7 @@ _mcount_newent(void) if (countbase == 0) return (NULL); - if (countbase >= _countlimit) + if (countbase >= countlimit) _mnewblock(); /* get a new block; set countbase */ if (countbase != 0) { diff --git a/usr/src/lib/libc/port/gen/msync.c b/usr/src/lib/libc/port/gen/msync.c index cf1e29031c..7a174b951c 100644 --- a/usr/src/lib/libc/port/gen/msync.c +++ b/usr/src/lib/libc/port/gen/msync.c @@ -24,12 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/gen/munlock.c b/usr/src/lib/libc/port/gen/munlock.c index 440f0b8ae8..9757df0e41 100644 --- a/usr/src/lib/libc/port/gen/munlock.c +++ b/usr/src/lib/libc/port/gen/munlock.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak munlock = _munlock +#pragma weak _munlock = munlock -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/gen/munlockall.c b/usr/src/lib/libc/port/gen/munlockall.c index 00e484e9d2..55f6a61a77 100644 --- a/usr/src/lib/libc/port/gen/munlockall.c +++ b/usr/src/lib/libc/port/gen/munlockall.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak munlockall = _munlockall - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/gen/ndbm.c b/usr/src/lib/libc/port/gen/ndbm.c index 70a8e5e275..f16af50dee 100644 --- a/usr/src/lib/libc/port/gen/ndbm.c +++ b/usr/src/lib/libc/port/gen/ndbm.c @@ -39,7 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/usr/src/lib/libc/port/gen/nftw.c b/usr/src/lib/libc/port/gen/nftw.c index f4247c2ed2..2deff1dbd4 100644 --- a/usr/src/lib/libc/port/gen/nftw.c +++ b/usr/src/lib/libc/port/gen/nftw.c @@ -20,15 +20,14 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * nftw - new file tree walk @@ -96,41 +95,6 @@ * */ -#include <sys/feature_tests.h> - -#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#pragma weak nftw64 = _nftw64 -#define _nftw _nftw64 -#define fstat64 _fstat64 -#define fstatat64 _fstatat64 -#define lstat64 _lstat64 -#define openat64 _openat64 -#define readdir64 _readdir64 -#define stat64 _stat64 -#else -#pragma weak nftw = _nftw -#define fstat _fstat -#define fstatat _fstatat -#define lstat _lstat -#define openat _openat -#define readdir _readdir -#define stat _stat -#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */ - -#define chdir _chdir -#define close _close -#define closedir _closedir -#define fchdir _fchdir -#define fdopendir _fdopendir -#define fprintf _fprintf -#define getcwd _getcwd -#define opendir _opendir -#define seekdir _seekdir -#define strdup _strdup -#define strerror _strerror -#define strtok_r _strtok_r -#define telldir _telldir - #include "lint.h" #include <mtlib.h> #include <sys/types.h> @@ -148,6 +112,16 @@ #include <strings.h> #include <fcntl.h> +#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 +#define nftw nftw64 +#define stat stat64 +#define fstat fstat64 +#define fstatat fstatat64 +#pragma weak _nftw64 = nftw64 +#else +#pragma weak _nftw = nftw +#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */ + #ifndef PATH_MAX #define PATH_MAX 1023 #endif @@ -518,7 +492,7 @@ quit: } int -_nftw(const char *path, +nftw(const char *path, int (*fn)(const char *, const struct stat *, int, struct FTW *), int depth, int flags) { diff --git a/usr/src/lib/libc/port/gen/nlspath_checks.c b/usr/src/lib/libc/port/gen/nlspath_checks.c index 5261031af0..94d998693c 100644 --- a/usr/src/lib/libc/port/gen/nlspath_checks.c +++ b/usr/src/lib/libc/port/gen/nlspath_checks.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <string.h> #include <syslog.h> @@ -149,7 +149,7 @@ nls_safe_open(const char *path, struct stat64 *statbuf, int *trust, int safe) */ if ((statbuf->st_mode & (S_IWOTH)) == 0 && ((statbuf->st_mode & (S_IWGRP)) == 0 || - (statbuf->st_gid < 4 && statbuf->st_gid != 1))) { + (statbuf->st_gid < 4 && statbuf->st_gid != 1))) { trust_group = 1; } @@ -464,7 +464,7 @@ done: } #ifdef DEBUG for (t = 0; t < maxarg * FORMAT_SIZE; t += FORMAT_SIZE) { - printf("%c(%d)", norm[t], norm[t+1]); + printf("%c(%d)", norm[t], norm[t+1]); } putchar('\n'); #endif @@ -610,6 +610,11 @@ clean_env(void) { const char **p; + if (environ == NULL) { /* can't happen? */ + nlspath_safe = 1; + return; + } + /* Find the first NLSPATH occurrence */ for (p = environ; *p; p++) if (**p == 'N' && nvmatch("NLSPATH", *p) != NULL) diff --git a/usr/src/lib/libc/port/gen/nsparse.c b/usr/src/lib/libc/port/gen/nsparse.c index 6af1f25278..57c07a7841 100644 --- a/usr/src/lib/libc/port/gen/nsparse.c +++ b/usr/src/lib/libc/port/gen/nsparse.c @@ -18,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include "libc.h" @@ -121,8 +122,7 @@ static void set_dns_default_lkp(struct __nsw_lookup_v1 *lkp) { if (strcasecmp(lkp->service_name, "dns") == 0) { - lkp->actions[__NSW_TRYAGAIN] = - __NSW_TRYAGAIN_NTIMES; + lkp->actions[__NSW_TRYAGAIN] = __NSW_TRYAGAIN_NTIMES; lkp->max_retries = dns_tryagain_retry; } } diff --git a/usr/src/lib/libc/port/gen/nss_common.c b/usr/src/lib/libc/port/gen/nss_common.c index 6f24fac496..c4d033a141 100644 --- a/usr/src/lib/libc/port/gen/nss_common.c +++ b/usr/src/lib/libc/port/gen/nss_common.c @@ -30,13 +30,7 @@ * Shared code used by the name-service-switch frontends (e.g. getpwnam_r()) */ -#pragma weak nss_delete = _nss_delete -#pragma weak nss_endent = _nss_endent -#pragma weak nss_getent = _nss_getent -#pragma weak nss_search = _nss_search -#pragma weak nss_setent = _nss_setent - -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <dlfcn.h> #include <atomic.h> diff --git a/usr/src/lib/libc/port/gen/nss_dbdefs.c b/usr/src/lib/libc/port/gen/nss_dbdefs.c index b77b507fe0..9dd9193fc9 100644 --- a/usr/src/lib/libc/port/gen/nss_dbdefs.c +++ b/usr/src/lib/libc/port/gen/nss_dbdefs.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <ctype.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/gen/nss_deffinder.c b/usr/src/lib/libc/port/gen/nss_deffinder.c index 7620512646..8ba91e9592 100644 --- a/usr/src/lib/libc/port/gen/nss_deffinder.c +++ b/usr/src/lib/libc/port/gen/nss_deffinder.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,9 +36,9 @@ /* Allow our finder(s) to be overridden by user-supplied ones */ -#pragma weak nss_default_finders = _nss_default_finders +#pragma weak _nss_default_finders = nss_default_finders -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <nss_common.h> #include <dlfcn.h> @@ -98,4 +99,4 @@ static nss_backend_finder_t SO_per_src = { 0 }; -nss_backend_finder_t *_nss_default_finders = &SO_per_src; +nss_backend_finder_t *nss_default_finders = &SO_per_src; diff --git a/usr/src/lib/libc/port/gen/opendir.c b/usr/src/lib/libc/port/gen/opendir.c index ca5b93b3ac..402fa76d62 100644 --- a/usr/src/lib/libc/port/gen/opendir.c +++ b/usr/src/lib/libc/port/gen/opendir.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * opendir -- C library extension routine * @@ -37,9 +37,9 @@ * while holding internal libc locks. */ -#pragma weak opendir = _opendir +#pragma weak _opendir = opendir -#include "synonyms.h" +#include "lint.h" #include <dirent.h> #include <stdlib.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/opt_data.c b/usr/src/lib/libc/port/gen/opt_data.c index 54359fd957..09fc5c4a39 100644 --- a/usr/src/lib/libc/port/gen/opt_data.c +++ b/usr/src/lib/libc/port/gen/opt_data.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,23 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Global variables * used in getopt */ -#include "synonyms.h" +#include "lint.h" int opterr = 1; int optind = 1; diff --git a/usr/src/lib/libc/port/gen/perror.c b/usr/src/lib/libc/port/gen/perror.c index 933bdc18cb..7f120935c8 100644 --- a/usr/src/lib/libc/port/gen/perror.c +++ b/usr/src/lib/libc/port/gen/perror.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "_libc_gettext.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/pfmt.c b/usr/src/lib/libc/port/gen/pfmt.c index 51866bac20..a89e6739ec 100644 --- a/usr/src/lib/libc/port/gen/pfmt.c +++ b/usr/src/lib/libc/port/gen/pfmt.c @@ -18,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak pfmt = _pfmt +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _pfmt = pfmt -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <pfmt.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/gen/pfmt_print.c b/usr/src/lib/libc/port/gen/pfmt_print.c index 3b8d3e4280..342346cf3b 100644 --- a/usr/src/lib/libc/port/gen/pfmt_print.c +++ b/usr/src/lib/libc/port/gen/pfmt_print.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * pfmt_print() - format and print */ -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <pfmt.h> #include <stdio.h> @@ -74,7 +73,7 @@ __pfmt_print(FILE *stream, long flag, const char *format, char c; ptr = format; for (i = 0; i < DB_NAME_LEN - 1 && (c = *ptr++) && c != ':'; - i++) + i++) catbuf[i] = c; /* Extract the message number */ if (i != DB_NAME_LEN - 1 && c) { diff --git a/usr/src/lib/libc/port/gen/plock.c b/usr/src/lib/libc/port/gen/plock.c index 92d2144422..1fb0367f1f 100644 --- a/usr/src/lib/libc/port/gen/plock.c +++ b/usr/src/lib/libc/port/gen/plock.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,9 +32,8 @@ * Supports SVID-compatible plock, taking into account dynamically linked * objects (such as shared libraries). */ -#pragma weak plock = _plock -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/gen/poll.c b/usr/src/lib/libc/port/gen/poll.c index 0f18d7fddf..e186a30b12 100644 --- a/usr/src/lib/libc/port/gen/poll.c +++ b/usr/src/lib/libc/port/gen/poll.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak poll = _poll +#pragma weak _poll = poll -#include "synonyms.h" +#include "lint.h" #include <sys/time.h> #include <sys/poll.h> #include "libc.h" diff --git a/usr/src/lib/libc/port/gen/priocntl.c b/usr/src/lib/libc/port/gen/priocntl.c index 2f76e857f1..71bf943b40 100644 --- a/usr/src/lib/libc/port/gen/priocntl.c +++ b/usr/src/lib/libc/port/gen/priocntl.c @@ -24,12 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <sys/types.h> #include <sys/procset.h> #include <sys/priocntl.h> diff --git a/usr/src/lib/libc/port/gen/priv_str_xlate.c b/usr/src/lib/libc/port/gen/priv_str_xlate.c index 36f7a7d7e5..763665c492 100644 --- a/usr/src/lib/libc/port/gen/priv_str_xlate.c +++ b/usr/src/lib/libc/port/gen/priv_str_xlate.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,11 +30,11 @@ * priv_str_xlate.c - Privilege translation routines. */ -#pragma weak priv_str_to_set = _priv_str_to_set -#pragma weak priv_set_to_str = _priv_set_to_str -#pragma weak priv_gettext = _priv_gettext +#pragma weak _priv_str_to_set = priv_str_to_set +#pragma weak _priv_set_to_str = priv_set_to_str +#pragma weak _priv_gettext = priv_gettext -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <stdlib.h> #include <ctype.h> @@ -400,7 +401,7 @@ do_priv_gettext(const char *priv, const char *file) /* Remove leading white space */ tstart = lp; while (*tstart != '\0' && - isspace((unsigned char)*tstart)) { + isspace((unsigned char)*tstart)) { tstart++; } diff --git a/usr/src/lib/libc/port/gen/privlib.c b/usr/src/lib/libc/port/gen/privlib.c index 57218876bc..911df6e1af 100644 --- a/usr/src/lib/libc/port/gen/privlib.c +++ b/usr/src/lib/libc/port/gen/privlib.c @@ -20,36 +20,36 @@ */ /* - * Copyright 2007 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" /* TSOL 8 */ - -#pragma weak getprivimplinfo = _getprivimplinfo -#pragma weak priv_addset = _priv_addset -#pragma weak priv_allocset = _priv_allocset -#pragma weak priv_copyset = _priv_copyset -#pragma weak priv_delset = _priv_delset -#pragma weak priv_emptyset = _priv_emptyset -#pragma weak priv_fillset = _priv_fillset -#pragma weak priv_freeset = _priv_freeset -#pragma weak priv_getbyname = _priv_getbyname -#pragma weak priv_getbynum = _priv_getbynum -#pragma weak priv_getsetbyname = _priv_getsetbyname -#pragma weak priv_getsetbynum = _priv_getsetbynum -#pragma weak priv_ineffect = _priv_ineffect -#pragma weak priv_intersect = _priv_intersect -#pragma weak priv_inverse = _priv_inverse -#pragma weak priv_isemptyset = _priv_isemptyset -#pragma weak priv_isequalset = _priv_isequalset -#pragma weak priv_isfullset = _priv_isfullset -#pragma weak priv_ismember = _priv_ismember -#pragma weak priv_issubset = _priv_issubset -#pragma weak priv_set = _priv_set -#pragma weak priv_union = _priv_union - -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _getprivimplinfo = getprivimplinfo +#pragma weak _priv_addset = priv_addset +#pragma weak _priv_allocset = priv_allocset +#pragma weak _priv_copyset = priv_copyset +#pragma weak _priv_delset = priv_delset +#pragma weak _priv_emptyset = priv_emptyset +#pragma weak _priv_fillset = priv_fillset +#pragma weak _priv_freeset = priv_freeset +#pragma weak _priv_getbyname = priv_getbyname +#pragma weak _priv_getbynum = priv_getbynum +#pragma weak _priv_getsetbyname = priv_getsetbyname +#pragma weak _priv_getsetbynum = priv_getsetbynum +#pragma weak _priv_ineffect = priv_ineffect +#pragma weak _priv_intersect = priv_intersect +#pragma weak _priv_inverse = priv_inverse +#pragma weak _priv_isemptyset = priv_isemptyset +#pragma weak _priv_isequalset = priv_isequalset +#pragma weak _priv_isfullset = priv_isfullset +#pragma weak _priv_ismember = priv_ismember +#pragma weak _priv_issubset = priv_issubset +#pragma weak _priv_set = priv_set +#pragma weak _priv_union = priv_union + +#include "lint.h" #define _STRUCTURED_PROC 1 @@ -193,7 +193,7 @@ __priv_parse_info(priv_impl_info_t *ip) tmparr[i].name = tmp->pd_privnames[i]; } qsort(tmparr, tmp->pd_nprivs, sizeof (struct strint), - strintcmp); + strintcmp); for (i = 0; i < tmp->pd_nprivs; i++) tmp->pd_setsort[i] = tmparr[i].rank; libc_free(tmparr); @@ -272,8 +272,8 @@ refresh_data(void) /* copy the extra information to the old datastructure */ (void) memcpy((char *)privdata->pd_pinfo + sizeof (priv_impl_info_t), - (char *)ip + sizeof (priv_impl_info_t), - PRIV_IMPL_INFO_SIZE(ip) - sizeof (priv_impl_info_t)); + (char *)ip + sizeof (priv_impl_info_t), + PRIV_IMPL_INFO_SIZE(ip) - sizeof (priv_impl_info_t)); /* Copy the first oldn pointers */ (void) memcpy(tmp->pd_privnames, privdata->pd_privnames, @@ -369,7 +369,7 @@ out: } const priv_impl_info_t * -_getprivimplinfo(void) +getprivimplinfo(void) { priv_data_t *d; @@ -430,7 +430,7 @@ priv_set(priv_op_t op, priv_ptype_t setname, ...) for (set = 0; set < d->pd_nsets; set++) if ((ret = syscall(SYS_privsys, PRIVSYS_SETPPRIV, op, - set, (void *)pset, d->pd_setsize)) != 0) + set, (void *)pset, d->pd_setsize)) != 0) break; } else { ret = setppriv(op, setname, pset); @@ -932,7 +932,7 @@ boolean_t __priv_issubset(priv_data_t *d, const priv_set_t *a, const priv_set_t *b) { PRIV_TEST_BODY_D(d, (((priv_chunk_t *)a)[i] | ((priv_chunk_t *)b)[i]) == - ((priv_chunk_t *)b)[i]); + ((priv_chunk_t *)b)[i]); } boolean_t diff --git a/usr/src/lib/libc/port/gen/psiginfo.c b/usr/src/lib/libc/port/gen/psiginfo.c index 316b5ea7b5..1675db36ee 100644 --- a/usr/src/lib/libc/port/gen/psiginfo.c +++ b/usr/src/lib/libc/port/gen/psiginfo.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,32 +18,30 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Print the name of the siginfo indicated by "sig", along with the * supplied message */ -#pragma weak psiginfo = _psiginfo - -#include "synonyms.h" -#include "_libc_gettext.h" -#include <sys/types.h> -#include <stdio.h> -#include <unistd.h> -#include <string.h> -#include <signal.h> -#include <siginfo.h> +#include "lint.h" +#include "_libc_gettext.h" +#include <sys/types.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <signal.h> +#include <siginfo.h> #define strsignal(i) (_libc_gettext(_sys_siglistp[i])) @@ -60,10 +57,9 @@ psiginfo(siginfo_t *sip, char *s) if (sip->si_code <= 0) { - /* LINTED variable format specifier */ (void) snprintf(buf, sizeof (buf), - _libc_gettext("%s : %s ( from process %d )\n"), - s, strsignal(sip->si_signo), sip->si_pid); + _libc_gettext("%s : %s ( from process %d )\n"), + s, strsignal(sip->si_signo), sip->si_pid); } else if (((listp = &_sys_siginfolist[sip->si_signo-1]) != NULL) && sip->si_code <= listp->nsiginfo) { c = _libc_gettext(listp->vsiginfo[sip->si_code-1]); @@ -72,24 +68,21 @@ psiginfo(siginfo_t *sip, char *s) case SIGBUS: case SIGILL: case SIGFPE: - /* LINTED variable format specifier */ (void) snprintf(buf, sizeof (buf), - _libc_gettext("%s : %s ( [%p] %s)\n"), - s, strsignal(sip->si_signo), - sip->si_addr, c); + _libc_gettext("%s : %s ( [%p] %s)\n"), + s, strsignal(sip->si_signo), + sip->si_addr, c); break; default: - /* LINTED variable format specifier */ (void) snprintf(buf, sizeof (buf), - _libc_gettext("%s : %s (%s)\n"), - s, strsignal(sip->si_signo), c); + _libc_gettext("%s : %s (%s)\n"), + s, strsignal(sip->si_signo), c); break; } } else { - /* LINTED variable format specifier */ (void) snprintf(buf, sizeof (buf), - _libc_gettext("%s : %s\n"), - s, strsignal(sip->si_signo)); + _libc_gettext("%s : %s\n"), + s, strsignal(sip->si_signo)); } (void) write(2, buf, strlen(buf)); } diff --git a/usr/src/lib/libc/port/gen/psignal.c b/usr/src/lib/libc/port/gen/psignal.c index 8682b210d2..201beaacd7 100644 --- a/usr/src/lib/libc/port/gen/psignal.c +++ b/usr/src/lib/libc/port/gen/psignal.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -44,16 +44,16 @@ * supplied message */ -#pragma weak psignal = _psignal +#pragma weak _psignal = psignal -#include "synonyms.h" -#include "_libc_gettext.h" -#include <sys/types.h> -#include <stdio.h> -#include <unistd.h> -#include <string.h> -#include <signal.h> -#include <siginfo.h> +#include "lint.h" +#include "_libc_gettext.h" +#include <sys/types.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <signal.h> +#include <siginfo.h> #define strsignal(i) (_libc_gettext(_sys_siglistp[i])) diff --git a/usr/src/lib/libc/port/gen/pt.c b/usr/src/lib/libc/port/gen/pt.c index f3ba9ee922..26dd4dd376 100644 --- a/usr/src/lib/libc/port/gen/pt.c +++ b/usr/src/lib/libc/port/gen/pt.c @@ -20,21 +20,20 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak ptsname = _ptsname -#pragma weak grantpt = _grantpt -#pragma weak unlockpt = _unlockpt -#pragma weak posix_openpt = _posix_openpt +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _ptsname = ptsname +#pragma weak _grantpt = grantpt +#pragma weak _unlockpt = unlockpt -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/putpwent.c b/usr/src/lib/libc/port/gen/putpwent.c index 805daefce6..efc482c7f4 100644 --- a/usr/src/lib/libc/port/gen/putpwent.c +++ b/usr/src/lib/libc/port/gen/putpwent.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * format a password file entry */ -#pragma weak putpwent = _putpwent -#include "synonyms.h" + +#include "lint.h" #include <sys/types.h> #include <stdio.h> #include <pwd.h> @@ -52,16 +51,16 @@ putpwent(const struct passwd *p, FILE *f) /* leading "+/-" taken from getpwnam_r.c */ if (black_magic) { (void) fprintf(f, ":::%s:%s:%s", - p->pw_gecos ? p->pw_gecos : "", - p->pw_dir ? p->pw_dir : "", - p->pw_shell ? p->pw_shell : ""); + p->pw_gecos ? p->pw_gecos : "", + p->pw_dir ? p->pw_dir : "", + p->pw_shell ? p->pw_shell : ""); } else { /* "normal case" */ (void) fprintf(f, ":%d:%d:%s:%s:%s", - p->pw_uid, - p->pw_gid, - p->pw_gecos, - p->pw_dir, - p->pw_shell); + p->pw_uid, + p->pw_gid, + p->pw_gecos, + p->pw_dir, + p->pw_shell); } (void) putc('\n', f); (void) fflush(f); diff --git a/usr/src/lib/libc/port/gen/putspent.c b/usr/src/lib/libc/port/gen/putspent.c index 9a49c7a773..fded4a495a 100644 --- a/usr/src/lib/libc/port/gen/putspent.c +++ b/usr/src/lib/libc/port/gen/putspent.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * format a shadow file entry @@ -36,9 +35,7 @@ * This code used to live in getspent.c */ -#pragma weak putspent = _putspent - -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <shadow.h> @@ -46,7 +43,7 @@ int putspent(const struct spwd *p, FILE *f) { (void) fprintf(f, "%s:%s:", p->sp_namp, - p->sp_pwdp ? p->sp_pwdp : ""); + p->sp_pwdp ? p->sp_pwdp : ""); /* pwdp could be null for +/- entries */ if (p->sp_lstchg >= 0) (void) fprintf(f, "%d:", p->sp_lstchg); diff --git a/usr/src/lib/libc/port/gen/raise.c b/usr/src/lib/libc/port/gen/raise.c index 2fe8ab6806..524664a555 100644 --- a/usr/src/lib/libc/port/gen/raise.c +++ b/usr/src/lib/libc/port/gen/raise.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <signal.h> #include <unistd.h> @@ -44,7 +43,7 @@ raise(int sig) { int error; - if ((error = _thr_kill(_thr_self(), sig)) != 0) { + if ((error = thr_kill(thr_self(), sig)) != 0) { errno = error; return (-1); } diff --git a/usr/src/lib/libc/port/gen/rand.c b/usr/src/lib/libc/port/gen/rand.c index 2ffa592b36..041f5d86e4 100644 --- a/usr/src/lib/libc/port/gen/rand.c +++ b/usr/src/lib/libc/port/gen/rand.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,9 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak rand_r = _rand_r - -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <stdlib.h> #include <atomic.h> diff --git a/usr/src/lib/libc/port/gen/random.c b/usr/src/lib/libc/port/gen/random.c index 9dd74e5e38..a0fe8c4fe3 100644 --- a/usr/src/lib/libc/port/gen/random.c +++ b/usr/src/lib/libc/port/gen/random.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/usr/src/lib/libc/port/gen/rctlops.c b/usr/src/lib/libc/port/gen/rctlops.c index f8d67e2f4b..c61eb8ec41 100644 --- a/usr/src/lib/libc/port/gen/rctlops.c +++ b/usr/src/lib/libc/port/gen/rctlops.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <sys/rctl_impl.h> #include <stdlib.h> #include <string.h> diff --git a/usr/src/lib/libc/port/gen/readdir.c b/usr/src/lib/libc/port/gen/readdir.c index 9b392e6c89..faa863380e 100644 --- a/usr/src/lib/libc/port/gen/readdir.c +++ b/usr/src/lib/libc/port/gen/readdir.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -46,11 +46,11 @@ #include <sys/feature_tests.h> #if !defined(_LP64) -#pragma weak readdir64 = _readdir64 +#pragma weak _readdir64 = readdir64 #endif -#pragma weak readdir = _readdir +#pragma weak _readdir = readdir -#include "synonyms.h" +#include "lint.h" #include <dirent.h> #include <limits.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/readdir_r.c b/usr/src/lib/libc/port/gen/readdir_r.c index 8b4f3758c4..b95bac475c 100644 --- a/usr/src/lib/libc/port/gen/readdir_r.c +++ b/usr/src/lib/libc/port/gen/readdir_r.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * readdir_r -- C library extension routine */ @@ -36,11 +36,10 @@ #include <sys/feature_tests.h> #if !defined(_LP64) -#pragma weak readdir64_r = _readdir64_r +#pragma weak _readdir64_r = readdir64_r #endif -#pragma weak readdir_r = _readdir_r -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <mtlib.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/realpath.c b/usr/src/lib/libc/port/gen/realpath.c index 4da4d7a557..08223f8f5c 100644 --- a/usr/src/lib/libc/port/gen/realpath.c +++ b/usr/src/lib/libc/port/gen/realpath.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak realpath = _realpath - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <dirent.h> #include <sys/param.h> diff --git a/usr/src/lib/libc/port/gen/reboot.c b/usr/src/lib/libc/port/gen/reboot.c index 77402fa502..fd63668559 100644 --- a/usr/src/lib/libc/port/gen/reboot.c +++ b/usr/src/lib/libc/port/gen/reboot.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -/* Portions Copyright(c) 1988, Sun Microsystems Inc. */ -/* All Rights Reserved */ - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/uadmin.h> #include <sys/reboot.h> diff --git a/usr/src/lib/libc/port/gen/regexpr.c b/usr/src/lib/libc/port/gen/regexpr.c index 44afcdc9e0..efa3c2e0f0 100644 --- a/usr/src/lib/libc/port/gen/regexpr.c +++ b/usr/src/lib/libc/port/gen/regexpr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * routines to do regular expression matching @@ -95,7 +94,7 @@ * regular expression encountered. */ -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <re_comp.h> @@ -303,10 +302,10 @@ re_exec(const char *p1) /* * regular algorithm */ - do + do { if (rv = advance(p1, p2)) return (rv); - while (*p1++); + } while (*p1++); return (0); } diff --git a/usr/src/lib/libc/port/gen/remove.c b/usr/src/lib/libc/port/gen/remove.c index bf76e3824b..db18a89e24 100644 --- a/usr/src/lib/libc/port/gen/remove.c +++ b/usr/src/lib/libc/port/gen/remove.c @@ -24,12 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/rewinddir.c b/usr/src/lib/libc/port/gen/rewinddir.c index e87634f140..e8964049e5 100644 --- a/usr/src/lib/libc/port/gen/rewinddir.c +++ b/usr/src/lib/libc/port/gen/rewinddir.c @@ -20,26 +20,27 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * rewinddir -- C library extension routine */ -#pragma weak rewinddir = _rewinddir +#pragma weak _rewinddir = rewinddir -#include "synonyms.h" +#include "lint.h" #include <dirent.h> +#undef rewinddir void -_rewinddir(DIR *dirp) +rewinddir(DIR *dirp) { (void) seekdir(dirp, 0L); } diff --git a/usr/src/lib/libc/port/gen/rindex.c b/usr/src/lib/libc/port/gen/rindex.c index 2057823dc6..05947571ef 100644 --- a/usr/src/lib/libc/port/gen/rindex.c +++ b/usr/src/lib/libc/port/gen/rindex.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <string.h> diff --git a/usr/src/lib/libc/port/gen/scandir.c b/usr/src/lib/libc/port/gen/scandir.c index 87ad989bcd..ec425e0466 100644 --- a/usr/src/lib/libc/port/gen/scandir.c +++ b/usr/src/lib/libc/port/gen/scandir.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -52,14 +52,14 @@ #include <sys/feature_tests.h> -#pragma weak scandir = _scandir -#pragma weak alphasort = _alphasort +#pragma weak _scandir = scandir +#pragma weak _alphasort = alphasort #if !defined(_LP64) -#pragma weak scandir64 = _scandir64 -#pragma weak alphasort64 = _alphasort64 +#pragma weak _scandir64 = scandir64 +#pragma weak _alphasort64 = alphasort64 #endif -#include "synonyms.h" +#include "lint.h" #include <dirent.h> #include <errno.h> #include <sys/types.h> @@ -138,7 +138,7 @@ scandir64(const char *dirname, struct dirent64 *(*namelist[]), (void) closedir(dirp); if (nitems && dcomp != NULL) qsort(names, nitems, sizeof (struct dirent64 *), - (int(*)(const void *, const void *))dcomp); + (int(*)(const void *, const void *))dcomp); *namelist = names; return ((int)nitems); @@ -211,7 +211,7 @@ scandir(const char *dirname, struct dirent *(*namelist[]), } arraysz += 512; /* no science here */ tmp = realloc(names, - arraysz * sizeof (struct dirent *)); + arraysz * sizeof (struct dirent *)); if (tmp == NULL) { free(p); goto fail; @@ -223,7 +223,7 @@ scandir(const char *dirname, struct dirent *(*namelist[]), (void) closedir(dirp); if (nitems && dcomp != NULL) qsort(names, nitems, sizeof (struct dirent *), - (int(*)(const void *, const void *))dcomp); + (int(*)(const void *, const void *))dcomp); *namelist = names; return ((int)nitems); diff --git a/usr/src/lib/libc/port/gen/seekdir.c b/usr/src/lib/libc/port/gen/seekdir.c index 96f550f86d..c10700d759 100644 --- a/usr/src/lib/libc/port/gen/seekdir.c +++ b/usr/src/lib/libc/port/gen/seekdir.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * seekdir -- C library extension routine */ @@ -36,11 +36,11 @@ #include <sys/feature_tests.h> #if !defined(_LP64) -#pragma weak seekdir64 = _seekdir64 +#pragma weak _seekdir64 = seekdir64 #endif -#pragma weak seekdir = _seekdir +#pragma weak _seekdir = seekdir -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <mtlib.h> #include <dirent.h> diff --git a/usr/src/lib/libc/port/gen/select.c b/usr/src/lib/libc/port/gen/select.c index d01908d0a0..ed39ba9efb 100644 --- a/usr/src/lib/libc/port/gen/select.c +++ b/usr/src/lib/libc/port/gen/select.c @@ -24,11 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Emulation of select() system call using poll() system call. * @@ -39,13 +39,11 @@ * Note that is it not feasible to emulate all error conditions, * in particular conditions that would return EFAULT are far too * difficult to check for in a library routine. - * */ -#pragma weak pselect = _pselect -#pragma weak select = _select +#pragma weak _select = select -#include "synonyms.h" +#include "lint.h" #include <values.h> #include <pthread.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/select_large_fdset.c b/usr/src/lib/libc/port/gen/select_large_fdset.c index 364b25d365..4411d38d58 100644 --- a/usr/src/lib/libc/port/gen/select_large_fdset.c +++ b/usr/src/lib/libc/port/gen/select_large_fdset.c @@ -24,11 +24,11 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Emulation of select() system call using _pollsys() system call. * @@ -52,15 +52,7 @@ #endif #define FD_SETSIZE 65536 -/* - * We do not #redefine the name since the only users of this - * are external to the libraries and commands. - * - * #pragma weak pselect_large_fdset = _pselect_large_fdset - * #pragma weak select_large_fdset = _select_large_fdset - */ - -#include "synonyms.h" +#include "lint.h" #include <values.h> #include <stdlib.h> #include <string.h> @@ -170,7 +162,7 @@ pselect_large_fdset(int nfds, fd_set *in0, fd_set *out0, fd_set *ex0, &nfds_on_list, &pfd_list, pfd)) == NULL) { if (pfd_list != pfd) - (void) free(pfd_list); + free(pfd_list); pthread_testcancel(); return (-1); } @@ -193,7 +185,7 @@ done: if (rv < 0) { /* no need to set bit masks */ if (pfd_list != pfd) - (void) free(pfd_list); + free(pfd_list); return (rv); } else if (rv == 0) { /* @@ -217,7 +209,7 @@ done: *ex++ = 0; } if (pfd_list != pfd) - (void) free(pfd_list); + free(pfd_list); return (0); } @@ -237,7 +229,7 @@ done: if (p->revents & POLLNVAL) { errno = EBADF; if (pfd_list != pfd) - (void) free(pfd_list); + free(pfd_list); return (-1); } /* @@ -336,7 +328,7 @@ done: } } if (pfd_list != pfd) - (void) free(pfd_list); + free(pfd_list); return (rv); } @@ -391,7 +383,7 @@ realloc_fds(int *num, struct pollfd **list_head, struct pollfd *orig) (void) memset(b, 0, (size_t)nta); (void) memcpy(b, *list_head, nta / 2); if (*list_head != orig) - (void) free(*list_head); + free(*list_head); *list_head = b; b += *num; *num = n2; diff --git a/usr/src/lib/libc/port/gen/setlabel.c b/usr/src/lib/libc/port/gen/setlabel.c index f1b310bfa8..927f7aa28d 100644 --- a/usr/src/lib/libc/port/gen/setlabel.c +++ b/usr/src/lib/libc/port/gen/setlabel.c @@ -18,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak setlabel = _setlabel +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _setlabel = setlabel -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <pfmt.h> #include <thread.h> diff --git a/usr/src/lib/libc/port/gen/setpriority.c b/usr/src/lib/libc/port/gen/setpriority.c index d737c2ca19..a26d28771f 100644 --- a/usr/src/lib/libc/port/gen/setpriority.c +++ b/usr/src/lib/libc/port/gen/setpriority.c @@ -39,8 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" - +#include "lint.h" #include <string.h> #include <limits.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/settimeofday.c b/usr/src/lib/libc/port/gen/settimeofday.c index 9df93a47bd..466933d7cc 100644 --- a/usr/src/lib/libc/port/gen/settimeofday.c +++ b/usr/src/lib/libc/port/gen/settimeofday.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak settimeofday = _settimeofday - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/time.h> #include <stdio.h> @@ -53,8 +50,7 @@ settimeofday(struct timeval *tp, void *tzp) if (tp == NULL) return (0); - if (tp->tv_sec < 0 || tp->tv_usec < 0 || - tp->tv_usec >= MICROSEC) { + if (tp->tv_sec < 0 || tp->tv_usec < 0 || tp->tv_usec >= MICROSEC) { errno = EINVAL; return (-1); } diff --git a/usr/src/lib/libc/port/gen/sh_locks.c b/usr/src/lib/libc/port/gen/sh_locks.c index b086da6530..6583efbc9c 100644 --- a/usr/src/lib/libc/port/gen/sh_locks.c +++ b/usr/src/lib/libc/port/gen/sh_locks.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <synch.h> diff --git a/usr/src/lib/libc/port/gen/sigflag.c b/usr/src/lib/libc/port/gen/sigflag.c index b11f055dca..b0f05f477e 100644 --- a/usr/src/lib/libc/port/gen/sigflag.c +++ b/usr/src/lib/libc/port/gen/sigflag.c @@ -20,20 +20,18 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -/* change state of signal flag */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak sigflag = _sigflag +/* change state of signal flag */ -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/gen/siglist.c b/usr/src/lib/libc/port/gen/siglist.c index f2608da362..b75381a145 100644 --- a/usr/src/lib/libc/port/gen/siglist.c +++ b/usr/src/lib/libc/port/gen/siglist.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/gen/sigsend.c b/usr/src/lib/libc/port/gen/sigsend.c index e23ee0c5fe..3a781e91ca 100644 --- a/usr/src/lib/libc/port/gen/sigsend.c +++ b/usr/src/lib/libc/port/gen/sigsend.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak sigsend = _sigsend +#pragma weak _sigsend = sigsend -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/procset.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/gen/sigsetops.c b/usr/src/lib/libc/port/gen/sigsetops.c index 6b273de06e..b9862220fb 100644 --- a/usr/src/lib/libc/port/gen/sigsetops.c +++ b/usr/src/lib/libc/port/gen/sigsetops.c @@ -24,25 +24,24 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * POSIX signal manipulation functions. */ -#pragma weak sigfillset = _sigfillset -#pragma weak sigemptyset = _sigemptyset -#pragma weak sigaddset = _sigaddset -#pragma weak sigdelset = _sigdelset -#pragma weak sigismember = _sigismember +#pragma weak _sigfillset = sigfillset +#pragma weak _sigemptyset = sigemptyset +#pragma weak _sigaddset = sigaddset +#pragma weak _sigdelset = sigdelset +#pragma weak _sigismember = sigismember -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdio.h> #include <sys/param.h> -#include <sys/errno.h> #include <sys/signal.h> #include <errno.h> #include "libc.h" diff --git a/usr/src/lib/libc/port/gen/ssignal.c b/usr/src/lib/libc/port/gen/ssignal.c index e00e556169..6030626b17 100644 --- a/usr/src/lib/libc/port/gen/ssignal.c +++ b/usr/src/lib/libc/port/gen/ssignal.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * ssignal, gsignal: software signals */ -#pragma weak gsignal = _gsignal -#pragma weak ssignal = _ssignal -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/gen/stack.c b/usr/src/lib/libc/port/gen/stack.c index 6b1e314e8a..317c926b1e 100644 --- a/usr/src/lib/libc/port/gen/stack.c +++ b/usr/src/lib/libc/port/gen/stack.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,20 +31,20 @@ /* * Initialization of the main stack is performed in libc_init(). - * Initialization of thread stacks is performed in _thr_setup(). + * Initialization of thread stacks is performed in _thrp_setup(). */ -#pragma weak stack_getbounds = _stack_getbounds +#pragma weak _stack_getbounds = stack_getbounds int -_stack_getbounds(stack_t *sp) +stack_getbounds(stack_t *sp) { *sp = curthread->ul_ustack; return (0); } -#pragma weak stack_setbounds = _stack_setbounds +#pragma weak _stack_setbounds = stack_setbounds int -_stack_setbounds(const stack_t *sp) +stack_setbounds(const stack_t *sp) { ulwp_t *self = curthread; @@ -69,9 +69,9 @@ _stack_setbounds(const stack_t *sp) * 0 addr is outside of the bounds of the current stack * Note that addr is an unbiased value. */ -#pragma weak stack_inbounds = _stack_inbounds +#pragma weak _stack_inbounds = stack_inbounds int -_stack_inbounds(void *addr) +stack_inbounds(void *addr) { stack_t *ustackp = &curthread->ul_ustack; uintptr_t base = (uintptr_t)ustackp->ss_sp; @@ -80,9 +80,9 @@ _stack_inbounds(void *addr) return ((uintptr_t)addr >= base && (uintptr_t)addr < base + size); } -#pragma weak stack_violation = _stack_violation +#pragma weak _stack_violation = stack_violation int -_stack_violation(int sig, const siginfo_t *sip, const ucontext_t *ucp) +stack_violation(int sig, const siginfo_t *sip, const ucontext_t *ucp) { uintptr_t addr; uintptr_t base; diff --git a/usr/src/lib/libc/port/gen/str2sig.c b/usr/src/lib/libc/port/gen/str2sig.c index f9283ab6e3..f899f1395e 100644 --- a/usr/src/lib/libc/port/gen/str2sig.c +++ b/usr/src/lib/libc/port/gen/str2sig.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" - -#pragma weak str2sig = _str2sig -#pragma weak sig2str = _sig2str - -#include "synonyms.h" - +#include "lint.h" #include <string.h> #include <stdlib.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/gen/strcase_charmap.c b/usr/src/lib/libc/port/gen/strcase_charmap.c index 8921606fd2..5e88e34afa 100644 --- a/usr/src/lib/libc/port/gen/strcase_charmap.c +++ b/usr/src/lib/libc/port/gen/strcase_charmap.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +34,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <strings.h> diff --git a/usr/src/lib/libc/port/gen/strcasecmp.c b/usr/src/lib/libc/port/gen/strcasecmp.c index b24e3d0f2b..c8e7ba62ac 100644 --- a/usr/src/lib/libc/port/gen/strcasecmp.c +++ b/usr/src/lib/libc/port/gen/strcasecmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +34,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <strings.h> diff --git a/usr/src/lib/libc/port/gen/strcat.c b/usr/src/lib/libc/port/gen/strcat.c index 99f56425fc..b127c96186 100644 --- a/usr/src/lib/libc/port/gen/strcat.c +++ b/usr/src/lib/libc/port/gen/strcat.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" - +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strchr.c b/usr/src/lib/libc/port/gen/strchr.c index 520e7e8842..acf3d1c07d 100644 --- a/usr/src/lib/libc/port/gen/strchr.c +++ b/usr/src/lib/libc/port/gen/strchr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stddef.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strcmp.c b/usr/src/lib/libc/port/gen/strcmp.c index 7e613be218..675b01f0db 100644 --- a/usr/src/lib/libc/port/gen/strcmp.c +++ b/usr/src/lib/libc/port/gen/strcmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strcpy.c b/usr/src/lib/libc/port/gen/strcpy.c index 6dd19f49ea..bcc5829560 100644 --- a/usr/src/lib/libc/port/gen/strcpy.c +++ b/usr/src/lib/libc/port/gen/strcpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strcspn.c b/usr/src/lib/libc/port/gen/strcspn.c index 4dc847cb11..03188550d1 100644 --- a/usr/src/lib/libc/port/gen/strcspn.c +++ b/usr/src/lib/libc/port/gen/strcspn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strdup.c b/usr/src/lib/libc/port/gen/strdup.c index 4fa0ae1450..162c16241c 100644 --- a/usr/src/lib/libc/port/gen/strdup.c +++ b/usr/src/lib/libc/port/gen/strdup.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak strdup = _strdup +#pragma weak _strdup = strdup -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stdlib.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strerror.c b/usr/src/lib/libc/port/gen/strerror.c index bc60768d85..213d964cf3 100644 --- a/usr/src/lib/libc/port/gen/strerror.c +++ b/usr/src/lib/libc/port/gen/strerror.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak strerror = _strerror -#pragma weak strerror_r = _strerror_r - -#include "synonyms.h" +#include "lint.h" #include "_libc_gettext.h" #include <string.h> #include <sys/types.h> @@ -44,7 +40,7 @@ extern const int _sys_index[]; extern int _sys_num_err; char * -_strerror(int errnum) +strerror(int errnum) { if (errnum < _sys_num_err && errnum >= 0) return (_libc_gettext((char *)&_sys_errs[_sys_index[errnum]])); @@ -57,7 +53,7 @@ _strerror(int errnum) * Implemented strerror_r in Solaris 10 to comply with SUSv3 2001. */ int -_strerror_r(int errnum, char *strerrbuf, size_t buflen) +strerror_r(int errnum, char *strerrbuf, size_t buflen) { char *buf; int ret = 0; diff --git a/usr/src/lib/libc/port/gen/strlcat.c b/usr/src/lib/libc/port/gen/strlcat.c index 17700ccdb2..07d1403dde 100644 --- a/usr/src/lib/libc/port/gen/strlcat.c +++ b/usr/src/lib/libc/port/gen/strlcat.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strlcpy.c b/usr/src/lib/libc/port/gen/strlcpy.c index 84e11a7120..7a8009b893 100644 --- a/usr/src/lib/libc/port/gen/strlcpy.c +++ b/usr/src/lib/libc/port/gen/strlcpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strlen.c b/usr/src/lib/libc/port/gen/strlen.c index 06cd9eb868..5c5fd67d14 100644 --- a/usr/src/lib/libc/port/gen/strlen.c +++ b/usr/src/lib/libc/port/gen/strlen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,23 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Returns the number of * non-NULL bytes in string argument. */ -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strncasecmp.c b/usr/src/lib/libc/port/gen/strncasecmp.c index 6868a7d00e..d06b7ac9c4 100644 --- a/usr/src/lib/libc/port/gen/strncasecmp.c +++ b/usr/src/lib/libc/port/gen/strncasecmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +34,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <strings.h> diff --git a/usr/src/lib/libc/port/gen/strncat.c b/usr/src/lib/libc/port/gen/strncat.c index 27d708760e..11e385e5e2 100644 --- a/usr/src/lib/libc/port/gen/strncat.c +++ b/usr/src/lib/libc/port/gen/strncat.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strncmp.c b/usr/src/lib/libc/port/gen/strncmp.c index b54e5078bb..ca734c51d5 100644 --- a/usr/src/lib/libc/port/gen/strncmp.c +++ b/usr/src/lib/libc/port/gen/strncmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strncpy.c b/usr/src/lib/libc/port/gen/strncpy.c index 489dd81f5e..7df39ad138 100644 --- a/usr/src/lib/libc/port/gen/strncpy.c +++ b/usr/src/lib/libc/port/gen/strncpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strnlen.c b/usr/src/lib/libc/port/gen/strnlen.c index 01b554e17a..605245b6bb 100644 --- a/usr/src/lib/libc/port/gen/strnlen.c +++ b/usr/src/lib/libc/port/gen/strnlen.c @@ -20,15 +20,13 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. + * Copyright 2008 Sun Microsystems, Inc. * All rights reserved. Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak strnlen = _strnlen - -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strpbrk.c b/usr/src/lib/libc/port/gen/strpbrk.c index 92dc18ffca..3b4af6fa01 100644 --- a/usr/src/lib/libc/port/gen/strpbrk.c +++ b/usr/src/lib/libc/port/gen/strpbrk.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stddef.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strrchr.c b/usr/src/lib/libc/port/gen/strrchr.c index 0e948ad560..ae3457c667 100644 --- a/usr/src/lib/libc/port/gen/strrchr.c +++ b/usr/src/lib/libc/port/gen/strrchr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stddef.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strsignal.c b/usr/src/lib/libc/port/gen/strsignal.c index 5295a4197b..db148c881d 100644 --- a/usr/src/lib/libc/port/gen/strsignal.c +++ b/usr/src/lib/libc/port/gen/strsignal.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak strsignal = _strsignal - -#include "synonyms.h" +#include "lint.h" #include "_libc_gettext.h" #include <string.h> #include <stddef.h> @@ -38,7 +36,7 @@ extern const char **_sys_siglistp; extern const int _sys_siglistn; char * -_strsignal(int signum) +strsignal(int signum) { if (signum < _sys_siglistn && signum >= 0) return (_libc_gettext((char *)_sys_siglistp[signum])); diff --git a/usr/src/lib/libc/port/gen/strspn.c b/usr/src/lib/libc/port/gen/strspn.c index f6ca1bad7f..266abb172a 100644 --- a/usr/src/lib/libc/port/gen/strspn.c +++ b/usr/src/lib/libc/port/gen/strspn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strstr.c b/usr/src/lib/libc/port/gen/strstr.c index 0c600832c1..a8d8d655af 100644 --- a/usr/src/lib/libc/port/gen/strstr.c +++ b/usr/src/lib/libc/port/gen/strstr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stddef.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strtod.c b/usr/src/lib/libc/port/gen/strtod.c index c19cdca8c1..5731fa9ef4 100644 --- a/usr/src/lib/libc/port/gen/strtod.c +++ b/usr/src/lib/libc/port/gen/strtod.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <errno.h> #include <stdio.h> #include <values.h> diff --git a/usr/src/lib/libc/port/gen/strtoimax.c b/usr/src/lib/libc/port/gen/strtoimax.c index 35b9d48155..9466563ec5 100644 --- a/usr/src/lib/libc/port/gen/strtoimax.c +++ b/usr/src/lib/libc/port/gen/strtoimax.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <inttypes.h> #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/strtok.c b/usr/src/lib/libc/port/gen/strtok.c index 68d712fe8b..c0393ffe15 100644 --- a/usr/src/lib/libc/port/gen/strtok.c +++ b/usr/src/lib/libc/port/gen/strtok.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stddef.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strtok_r.c b/usr/src/lib/libc/port/gen/strtok_r.c index 9eb622ae74..31cb290504 100644 --- a/usr/src/lib/libc/port/gen/strtok_r.c +++ b/usr/src/lib/libc/port/gen/strtok_r.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak strtok_r = _strtok_r - -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stddef.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/strtoll.c b/usr/src/lib/libc/port/gen/strtoll.c index cafc2925c6..d594cd9053 100644 --- a/usr/src/lib/libc/port/gen/strtoll.c +++ b/usr/src/lib/libc/port/gen/strtoll.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak strtoll = _strtoll - -#include "synonyms.h" +#include "lint.h" #include <errno.h> #include <ctype.h> #include <limits.h> @@ -99,7 +96,7 @@ strtoll(const char *str, char **nptr, int base) if (!lisalnum(c) || (xx = DIGIT(c)) >= base) return (0); /* no number formed */ if (base == 16 && c == '0' && (ustr[1] == 'x' || ustr[1] == 'X') && - isxdigit(ustr[2])) + isxdigit(ustr[2])) c = *(ustr += 2); /* skip over leading "0x" or "0X" */ /* this code assumes that abs(llong_min) >= abs(llong_max) */ diff --git a/usr/src/lib/libc/port/gen/strtoull.c b/usr/src/lib/libc/port/gen/strtoull.c index 393056a459..6d474eded6 100644 --- a/usr/src/lib/libc/port/gen/strtoull.c +++ b/usr/src/lib/libc/port/gen/strtoull.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak strtoull = _strtoull - -#include "synonyms.h" +#include "lint.h" #include <errno.h> #include <ctype.h> #include <limits.h> @@ -100,7 +97,7 @@ strtoull(const char *str, char **nptr, int base) if (!lisalnum(c) || (xx = DIGIT(c)) >= base) return (0); /* no number formed */ if (base == 16 && c == '0' && (ustr[1] == 'x' || ustr[1] == 'X') && - isxdigit(ustr[2])) + isxdigit(ustr[2])) c = *(ustr += 2); /* skip over leading "0x" or "0X" */ multmax = ullong_max / (u_longlong_t)base; diff --git a/usr/src/lib/libc/port/gen/strtoumax.c b/usr/src/lib/libc/port/gen/strtoumax.c index 2fb3f144e4..ac39c6caf4 100644 --- a/usr/src/lib/libc/port/gen/strtoumax.c +++ b/usr/src/lib/libc/port/gen/strtoumax.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <inttypes.h> #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/swab.c b/usr/src/lib/libc/port/gen/swab.c index ebbde7fcee..6dafc38507 100644 --- a/usr/src/lib/libc/port/gen/swab.c +++ b/usr/src/lib/libc/port/gen/swab.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Swab bytes */ -#pragma weak swab = _swab +#pragma weak _swab = swab -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/gen/swapctl.c b/usr/src/lib/libc/port/gen/swapctl.c index 7b8c6d1db8..e49d743ac6 100644 --- a/usr/src/lib/libc/port/gen/swapctl.c +++ b/usr/src/lib/libc/port/gen/swapctl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak swapctl = _swapctl - -#include "synonyms.h" +#include "lint.h" #include "sys/uadmin.h" #include <sys/types.h> #include <sys/swap.h> diff --git a/usr/src/lib/libc/port/gen/sysconf.c b/usr/src/lib/libc/port/gen/sysconf.c index 4b06010170..2599bfa4d0 100644 --- a/usr/src/lib/libc/port/gen/sysconf.c +++ b/usr/src/lib/libc/port/gen/sysconf.c @@ -18,27 +18,26 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* sysconf(3C) - returns system configuration information */ -#pragma weak sysconf = _sysconf +#pragma weak _sysconf = sysconf -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/sysconfig.h> -#include <sys/errno.h> #include <limits.h> #include <time.h> #include <errno.h> @@ -378,7 +377,7 @@ sysconf(int name) return (-1L); case _SC_THREAD_STACK_MIN: - return ((long)_thr_min_stack()); + return ((long)thr_min_stack()); case _SC_THREAD_THREADS_MAX: return (-1L); diff --git a/usr/src/lib/libc/port/gen/syslog.c b/usr/src/lib/libc/port/gen/syslog.c index 487da876e0..aa535a1edf 100644 --- a/usr/src/lib/libc/port/gen/syslog.c +++ b/usr/src/lib/libc/port/gen/syslog.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -53,13 +53,9 @@ * The output of this routine is intended to be read by /etc/syslogd. */ -#pragma weak syslog = _syslog -#pragma weak vsyslog = _vsyslog -#pragma weak openlog = _openlog -#pragma weak closelog = _closelog -#pragma weak setlogmask = _setlogmask +#pragma weak _syslog = syslog -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/types32.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/gen/tcdrain.c b/usr/src/lib/libc/port/gen/tcdrain.c index 78190fe231..3f26ede375 100644 --- a/usr/src/lib/libc/port/gen/tcdrain.c +++ b/usr/src/lib/libc/port/gen/tcdrain.c @@ -24,12 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <sys/termios.h> #include <unistd.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/tcflow.c b/usr/src/lib/libc/port/gen/tcflow.c index 842b68eed4..0f25d36920 100644 --- a/usr/src/lib/libc/port/gen/tcflow.c +++ b/usr/src/lib/libc/port/gen/tcflow.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcflow = _tcflow +#pragma weak _tcflow = tcflow -#include "synonyms.h" +#include "lint.h" #include <sys/termios.h> #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/tcflush.c b/usr/src/lib/libc/port/gen/tcflush.c index f496d5e1db..6bfe406198 100644 --- a/usr/src/lib/libc/port/gen/tcflush.c +++ b/usr/src/lib/libc/port/gen/tcflush.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcflush = _tcflush +#pragma weak _tcflush = tcflush -#include "synonyms.h" +#include "lint.h" #include <sys/termios.h> #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/tcgetattr.c b/usr/src/lib/libc/port/gen/tcgetattr.c index ec1f8955a9..aa469e892c 100644 --- a/usr/src/lib/libc/port/gen/tcgetattr.c +++ b/usr/src/lib/libc/port/gen/tcgetattr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcgetattr = _tcgetattr +#pragma weak _tcgetattr = tcgetattr -#include "synonyms.h" +#include "lint.h" #include <sys/termios.h> #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/tcgetpgrp.c b/usr/src/lib/libc/port/gen/tcgetpgrp.c index ac3bf745ca..ed4e452cb2 100644 --- a/usr/src/lib/libc/port/gen/tcgetpgrp.c +++ b/usr/src/lib/libc/port/gen/tcgetpgrp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcgetpgrp = _tcgetpgrp +#pragma weak _tcgetpgrp = tcgetpgrp -#include "synonyms.h" +#include "lint.h" #include <sys/termios.h> #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/tcgetsid.c b/usr/src/lib/libc/port/gen/tcgetsid.c index 92511edc27..7152f592fb 100644 --- a/usr/src/lib/libc/port/gen/tcgetsid.c +++ b/usr/src/lib/libc/port/gen/tcgetsid.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcgetsid = _tcgetsid +#pragma weak _tcgetsid = tcgetsid -#include "synonyms.h" +#include "lint.h" #include <sys/termios.h> #include <sys/types.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/tcsendbreak.c b/usr/src/lib/libc/port/gen/tcsendbreak.c index 465b17b0ea..16f7e81bf6 100644 --- a/usr/src/lib/libc/port/gen/tcsendbreak.c +++ b/usr/src/lib/libc/port/gen/tcsendbreak.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcsendbreak = _tcsendbreak +#pragma weak _tcsendbreak = tcsendbreak -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/termios.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/tcsetattr.c b/usr/src/lib/libc/port/gen/tcsetattr.c index 2644d50f43..f36de46e82 100644 --- a/usr/src/lib/libc/port/gen/tcsetattr.c +++ b/usr/src/lib/libc/port/gen/tcsetattr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcsetattr = _tcsetattr +#pragma weak _tcsetattr = tcsetattr -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/termios.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/tcsetpgrp.c b/usr/src/lib/libc/port/gen/tcsetpgrp.c index b6e6b9db3a..1470d1439b 100644 --- a/usr/src/lib/libc/port/gen/tcsetpgrp.c +++ b/usr/src/lib/libc/port/gen/tcsetpgrp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tcsetpgrp = _tcsetpgrp +#pragma weak _tcsetpgrp = tcsetpgrp -#include "synonyms.h" +#include "lint.h" #include <sys/termios.h> #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/tell.c b/usr/src/lib/libc/port/gen/tell.c index 2391cd4da5..4cd1e24fa4 100644 --- a/usr/src/lib/libc/port/gen/tell.c +++ b/usr/src/lib/libc/port/gen/tell.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * return offset in file. @@ -37,12 +36,12 @@ #include <sys/feature_tests.h> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#pragma weak tell64 = _tell64 +#pragma weak _tell64 = tell64 #else -#pragma weak tell = _tell +#pragma weak _tell = tell #endif -#include "synonyms.h" +#include "lint.h" #include <fcntl.h> #include <stdio.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/telldir.c b/usr/src/lib/libc/port/gen/telldir.c index ea8f70f9a8..86721d077a 100644 --- a/usr/src/lib/libc/port/gen/telldir.c +++ b/usr/src/lib/libc/port/gen/telldir.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * telldir -- C library extension routine */ @@ -36,11 +36,11 @@ #include <sys/isa_defs.h> #if !defined(_LP64) -#pragma weak telldir64 = _telldir64 +#pragma weak _telldir64 = telldir64 #endif -#pragma weak telldir = _telldir +#pragma weak _telldir = telldir -#include "synonyms.h" +#include "lint.h" #include "libc.h" #include <mtlib.h> #include <dirent.h> diff --git a/usr/src/lib/libc/port/gen/tfind.c b/usr/src/lib/libc/port/gen/tfind.c index 6fccc089c7..f34d477674 100644 --- a/usr/src/lib/libc/port/gen/tfind.c +++ b/usr/src/lib/libc/port/gen/tfind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Tree search algorithm, generalized from Knuth (6.2.2) Algorithm T. @@ -37,9 +36,9 @@ * because the definition of NODE isn't available to the user. */ -#pragma weak tfind = _tfind +#pragma weak _tfind = tfind -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <search.h> diff --git a/usr/src/lib/libc/port/gen/time_data.c b/usr/src/lib/libc/port/gen/time_data.c index 3226079bb8..7593e5f842 100644 --- a/usr/src/lib/libc/port/gen/time_data.c +++ b/usr/src/lib/libc/port/gen/time_data.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <time.h> #include <tzfile.h> /* diff --git a/usr/src/lib/libc/port/gen/time_gdata.c b/usr/src/lib/libc/port/gen/time_gdata.c index d94bdbae23..d23e096738 100644 --- a/usr/src/lib/libc/port/gen/time_gdata.c +++ b/usr/src/lib/libc/port/gen/time_gdata.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,26 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak altzone = _altzone -#pragma weak daylight = _daylight -#pragma weak timezone = _timezone -#pragma weak tzname = _tzname +#pragma weak _altzone = altzone +#pragma weak _daylight = daylight +#pragma weak _timezone = timezone +#pragma weak _tzname = tzname -#include "synonyms.h" -#include <mtlib.h> +#include "lint.h" +#include <mtlib.h> #include <sys/types.h> -#include <time.h> +#include <time.h> #include <synch.h> long int timezone = 0; /* XPG4 version 2 */ diff --git a/usr/src/lib/libc/port/gen/truncate.c b/usr/src/lib/libc/port/gen/truncate.c index eff577845f..d3db2cb28e 100644 --- a/usr/src/lib/libc/port/gen/truncate.c +++ b/usr/src/lib/libc/port/gen/truncate.c @@ -24,11 +24,10 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * ftruncate() and truncate() set a file to a specified @@ -41,16 +40,13 @@ #include <sys/feature_tests.h> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#pragma weak ftruncate64 = _ftruncate64 -#pragma weak truncate64 = _truncate64 -#define _ftruncate _ftruncate64 -#define _truncate _truncate64 -#else /* !_LP64 && _FILE_OFFSET_BITS == 64 */ -#pragma weak ftruncate = _ftruncate -#pragma weak truncate = _truncate +#pragma weak _ftruncate64 = ftruncate64 +#pragma weak _truncate64 = truncate64 +#define ftruncate ftruncate64 +#define truncate truncate64 #endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */ -#include "synonyms.h" +#include "lint.h" #include <unistd.h> #include <stdio.h> #include <fcntl.h> @@ -58,7 +54,7 @@ #include <sys/types.h> int -_ftruncate(int fildes, off_t len) +ftruncate(int fildes, off_t len) { struct flock lck; @@ -74,7 +70,7 @@ _ftruncate(int fildes, off_t len) } int -_truncate(const char *path, off_t len) +truncate(const char *path, off_t len) { int rval = 0; diff --git a/usr/src/lib/libc/port/gen/tsdalloc.c b/usr/src/lib/libc/port/gen/tsdalloc.c index 1da9dc01e2..db04a23c01 100644 --- a/usr/src/lib/libc/port/gen/tsdalloc.c +++ b/usr/src/lib/libc/port/gen/tsdalloc.c @@ -20,14 +20,15 @@ */ /* - * Copyright 2007 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" -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> +#include <pthread.h> #include <errno.h> #include "mtlib.h" #include "libc.h" @@ -75,12 +76,12 @@ tsdalloc(__tsd_item_t n, size_t size, pfrv_t destructor) return (NULL); } - if ((error = _thr_keycreate_once(&key, _free_tsdbuf)) != 0) { + if ((error = thr_keycreate_once(&key, _free_tsdbuf)) != 0) { errno = error; return (NULL); } - if ((loc = _pthread_getspecific(key)) != NULL) { + if ((loc = pthread_getspecific(key)) != NULL) { if ((p = loc[n].buf) != NULL) return (p); } else { @@ -88,7 +89,7 @@ tsdalloc(__tsd_item_t n, size_t size, pfrv_t destructor) loc = lmalloc(_T_NUM_ENTRIES * sizeof (tsdent_t)); if (loc == NULL) return (NULL); - if ((error = _thr_setspecific(key, loc)) != 0) { + if ((error = thr_setspecific(key, loc)) != 0) { lfree(loc, _T_NUM_ENTRIES * sizeof (tsdent_t)); errno = error; return (NULL); diff --git a/usr/src/lib/libc/port/gen/tsearch.c b/usr/src/lib/libc/port/gen/tsearch.c index d7d3388398..f6a92acc85 100644 --- a/usr/src/lib/libc/port/gen/tsearch.c +++ b/usr/src/lib/libc/port/gen/tsearch.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Tree search algorithm, generalized from Knuth (6.2.2) Algorithm T. @@ -38,11 +37,11 @@ * because the definition of NODE isn't available to the user. */ -#pragma weak tdelete = _tdelete -#pragma weak tsearch = _tsearch -#pragma weak twalk = _twalk +#pragma weak _tdelete = tdelete +#pragma weak _tsearch = tsearch +#pragma weak _twalk = twalk -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "libc.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/ttyname.c b/usr/src/lib/libc/port/gen/ttyname.c index 7de2085691..df2d4aefb0 100644 --- a/usr/src/lib/libc/port/gen/ttyname.c +++ b/usr/src/lib/libc/port/gen/ttyname.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * ttyname(f): return "/dev/X" (where X is a relative pathname * under /dev/), which is the name of the tty character special @@ -64,10 +64,9 @@ * device numbers. */ -#pragma weak ttyname = _ttyname -#pragma weak ttyname_r = _ttyname_r +#pragma weak _ttyname = ttyname -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "libc.h" #include "_libc_gettext.h" @@ -173,7 +172,7 @@ _ttyname_dev(dev_t rdev, char *buffer, size_t buflen) * It was implemented by Solaris 2.3. */ char * -_ttyname_r(int f, char *buffer, int buflen) +ttyname_r(int f, char *buffer, int buflen) { struct stat64 fsb; /* what we are searching for */ /* @@ -342,7 +341,7 @@ __posix_ttyname_r(int fildes, char *name, size_t namesize) else namelen = (int)namesize; - if (_ttyname_r(fildes, name, namelen) == NULL) { + if (ttyname_r(fildes, name, namelen) == NULL) { if (errno == 0) nerrno = EINVAL; else @@ -734,7 +733,6 @@ get_pri_dirs(void) int tfd = open("/dev/console", O_WRONLY); if (tfd >= 0) { char buf[256]; - /* LINTED variable format specifier */ (void) snprintf(buf, sizeof (buf), _libc_gettext( "ERROR: Entry '%s' in /etc/ttysrch ignored.\n"), vec->name); @@ -772,5 +770,5 @@ ttyname(int f) if (ans == NULL) return (NULL); - return (_ttyname_r(f, ans, MAX_DEV_PATH)); + return (ttyname_r(f, ans, MAX_DEV_PATH)); } diff --git a/usr/src/lib/libc/port/gen/ttyslot.c b/usr/src/lib/libc/port/gen/ttyslot.c index 56ad069576..d9b6b88839 100644 --- a/usr/src/lib/libc/port/gen/ttyslot.c +++ b/usr/src/lib/libc/port/gen/ttyslot.c @@ -24,20 +24,18 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* * Return the number of the slot in the utmp file * corresponding to the current user: try for file 0, 1, 2. * Returns -1 if slot not found. */ -#pragma weak ttyslot = _ttyslot - -#include "synonyms.h" +#include "lint.h" #include <string.h> #include <stdio.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/gen/ualarm.c b/usr/src/lib/libc/port/gen/ualarm.c index 6d65f5c092..b75114a499 100644 --- a/usr/src/lib/libc/port/gen/ualarm.c +++ b/usr/src/lib/libc/port/gen/ualarm.c @@ -1,21 +1,20 @@ /* - * Copyright 2004 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" - /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - /* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <sys/types.h> #include <sys/time.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/ucred.c b/usr/src/lib/libc/port/gen/ucred.c index 03b6fa325f..f56e7caf63 100644 --- a/usr/src/lib/libc/port/gen/ucred.c +++ b/usr/src/lib/libc/port/gen/ucred.c @@ -18,35 +18,36 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#pragma weak ucred_free = _ucred_free -#pragma weak ucred_get = _ucred_get -#pragma weak ucred_getegid = _ucred_getegid -#pragma weak ucred_geteuid = _ucred_geteuid -#pragma weak ucred_getgroups = _ucred_getgroups -#pragma weak ucred_getpflags = _ucred_getpflags -#pragma weak ucred_getpid = _ucred_getpid -#pragma weak ucred_getzoneid = _ucred_getzoneid -#pragma weak ucred_getprojid = _ucred_getprojid -#pragma weak ucred_getprivset = _ucred_getprivset -#pragma weak ucred_getrgid = _ucred_getrgid -#pragma weak ucred_getruid = _ucred_getruid -#pragma weak ucred_getsgid = _ucred_getsgid -#pragma weak ucred_getsuid = _ucred_getsuid -#pragma weak ucred_getauid = _ucred_getauid -#pragma weak ucred_getasid = _ucred_getasid -#pragma weak ucred_getatid = _ucred_getatid -#pragma weak ucred_getlabel = _ucred_getlabel -#pragma weak ucred_getamask = _ucred_getamask -#pragma weak ucred_size = _ucred_size - -#include "synonyms.h" +#pragma weak _ucred_free = ucred_free +#pragma weak _ucred_get = ucred_get +#pragma weak _ucred_getegid = ucred_getegid +#pragma weak _ucred_geteuid = ucred_geteuid +#pragma weak _ucred_getgroups = ucred_getgroups +#pragma weak _ucred_getpflags = ucred_getpflags +#pragma weak _ucred_getpid = ucred_getpid +#pragma weak _ucred_getzoneid = ucred_getzoneid +#pragma weak _ucred_getprojid = ucred_getprojid +#pragma weak _ucred_getprivset = ucred_getprivset +#pragma weak _ucred_getrgid = ucred_getrgid +#pragma weak _ucred_getruid = ucred_getruid +#pragma weak _ucred_getsgid = ucred_getsgid +#pragma weak _ucred_getsuid = ucred_getsuid +#pragma weak _ucred_getauid = ucred_getauid +#pragma weak _ucred_getasid = ucred_getasid +#pragma weak _ucred_getatid = ucred_getatid +#pragma weak _ucred_getlabel = ucred_getlabel +#pragma weak _ucred_getamask = ucred_getamask +#pragma weak _ucred_size = ucred_size + +#include "lint.h" #define _STRUCTURED_PROC 1 diff --git a/usr/src/lib/libc/port/gen/valloc.c b/usr/src/lib/libc/port/gen/valloc.c index a3986f8310..e20ef38fd6 100644 --- a/usr/src/lib/libc/port/gen/valloc.c +++ b/usr/src/lib/libc/port/gen/valloc.c @@ -20,17 +20,16 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/gen/vlfmt.c b/usr/src/lib/libc/port/gen/vlfmt.c index 6403087f0b..26275de166 100644 --- a/usr/src/lib/libc/port/gen/vlfmt.c +++ b/usr/src/lib/libc/port/gen/vlfmt.c @@ -18,22 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* vlfmt() - format, print and log (variable arguments) */ -#pragma weak vlfmt = _vlfmt +#pragma weak _vlfmt = vlfmt -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <pfmt.h> diff --git a/usr/src/lib/libc/port/gen/vpfmt.c b/usr/src/lib/libc/port/gen/vpfmt.c index dbe5499882..081627256b 100644 --- a/usr/src/lib/libc/port/gen/vpfmt.c +++ b/usr/src/lib/libc/port/gen/vpfmt.c @@ -18,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * vpfmt() - format and print (variable argument list) */ -#pragma weak vpfmt = _vpfmt +#pragma weak _vpfmt = vpfmt -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <pfmt.h> diff --git a/usr/src/lib/libc/port/gen/waitpid.c b/usr/src/lib/libc/port/gen/waitpid.c index 3a7d66330e..8f67f2dd40 100644 --- a/usr/src/lib/libc/port/gen/waitpid.c +++ b/usr/src/lib/libc/port/gen/waitpid.c @@ -24,20 +24,18 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + /* - * All of these functions are cancellation points. + * All of the wait*() functions are cancellation points. */ -#pragma weak waitpid = _waitpid -#pragma weak wait = _wait -#pragma weak wait4 = _wait4 -#pragma weak wait3 = _wait3 +#pragma weak _waitpid = waitpid +#pragma weak _wait = wait -#include "synonyms.h" +#include "lint.h" #include <unistd.h> #include <string.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/gen/walkstack.c b/usr/src/lib/libc/port/gen/walkstack.c index 9e2d0fcd5f..a4bcef258e 100644 --- a/usr/src/lib/libc/port/gen/walkstack.c +++ b/usr/src/lib/libc/port/gen/walkstack.c @@ -18,7 +18,7 @@ * * CDDL HEADER END * - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -76,7 +76,7 @@ * The bottom-most struct frame is actually constructed by the kernel by * copying the previous stack frame, allowing naive backtrace code to simply * skip over the interrupted frame. The copied frame is never really used, - * since it is presumed the libc or libthread signal handler wrapper function + * since it is presumed the signal handler wrapper function * will explicitly setcontext(2) to the interrupted context if the user * program's handler returns. If we detect a signal handler frame, we simply * read the interrupted context structure from the stack, use its embedded @@ -96,18 +96,11 @@ * Since we want to provide the signal number that generated a signal stack * frame and on sparc this information isn't written to the stack by the kernel * the way it's done on i386, we're forced to read the signo from the stack as - * one of the arguments to the signal handler. What we hope is that no one has - * used __sigaction directly; if we're not linked with libthread - * (_thr_sighndlrinfo is NULL) then we attempt to read the signo directly from - * the register window. Otherwise we use the _thr_sighndlrinfo interface to find - * the correct frame. - * + * one of the arguments to the signal handler. We use the thr_sighndlrinfo + * interface to find the correct frame. */ -#pragma weak walkcontext = _walkcontext -#pragma weak printstack = _printstack - -#include "synonyms.h" +#include "lint.h" #include <assert.h> #include <dlfcn.h> #include <fcntl.h> @@ -221,11 +214,9 @@ walkcontext(const ucontext_t *uptr, int (*operate_func)(uintptr_t, int, void *), /* * Since we don't write signo to the stack on sparc, we need - * to extract signo from the stack frames. This is problematic - * in the case of libthread (libc has deterministic behavior) - * since we're not sure where we can do that safely. An awkward - * interface was provided for this purpose in libthread: - * _thr_sighndlrinfo; this is documented in + * to extract signo from the stack frames. + * An awkward interface is provided for this purpose: + * thr_sighndlrinfo; this is documented in * /shared/sac/PSARC/1999/024. When called, this function * returns the PC of a special function (and its size) that * will be present in the stack frame if a signal was @@ -235,20 +226,15 @@ walkcontext(const ucontext_t *uptr, int (*operate_func)(uintptr_t, int, void *), * Since this function is written in assembler and doesn't * perturb its registers, we can then read sig out of arg0 * when the saved pc is inside this function. - * */ #if defined(__sparc) uintptr_t special_pc = NULL; int special_size = 0; - extern void _thr_sighndlrinfo(void (**func)(), int *funcsize); - -#pragma weak _thr_sighndlrinfo + extern void thr_sighndlrinfo(void (**func)(), int *funcsize); - if (_thr_sighndlrinfo != NULL) { - _thr_sighndlrinfo((void (**)())&special_pc, &special_size); - } + thr_sighndlrinfo((void (**)())&special_pc, &special_size); #endif /* sparc */ @@ -290,24 +276,14 @@ walkcontext(const ucontext_t *uptr, int (*operate_func)(uintptr_t, int, void *), #if defined(__sparc) /* - * with sparc we need to handle - * single and multi-threaded cases - * separately - * If we're single threaded, the trampoline - * in libc will have the signo as the first - * argumment; we can snag that directly. * In the case of threads, since there are multiple * complex routines between kernel and user handler, * we need to figure out where we can read signal from - * using _thr_sighndlrinfo - which we've already done + * using thr_sighndlrinfo - which we've already done * for this signal, since it appeared on the stack * before the signal frame.... sigh. */ - - if (_thr_sighndlrinfo == NULL) /* single threaded */ - sig = fp->fr_arg[0]; - else - sig = signo; /* already read - see below */ + sig = signo; /* already read - see below */ #endif /* * this is the special signal frame, so cons up @@ -328,8 +304,7 @@ walkcontext(const ucontext_t *uptr, int (*operate_func)(uintptr_t, int, void *), * lookahead code to find right spot to read signo from... */ - if (_thr_sighndlrinfo && - savepc >= special_pc && savepc < + if (savepc >= special_pc && savepc < (special_pc + special_size)) signo = fp->fr_arg[0]; #endif @@ -389,7 +364,7 @@ display_stack_info(uintptr_t pc, int signo, void *arg) (void) sig2str(signo, sigbuf); async_filenoprintf(filenum, "%s [Signal %d (%s)]\n", - buffer, (ulong_t)signo, sigbuf); + buffer, (ulong_t)signo, sigbuf); } else async_filenoprintf(filenum, "%s\n", buffer); diff --git a/usr/src/lib/libc/port/gen/wdata.c b/usr/src/lib/libc/port/gen/wdata.c index b0505387f5..d0e65e2ea3 100644 --- a/usr/src/lib/libc/port/gen/wdata.c +++ b/usr/src/lib/libc/port/gen/wdata.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -/* This module is created for NLS on Sep.03.86 */ - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <euc.h> diff --git a/usr/src/lib/libc/port/gen/xgetwidth.c b/usr/src/lib/libc/port/gen/xgetwidth.c index 01334b33dc..b4aa18649d 100644 --- a/usr/src/lib/libc/port/gen/xgetwidth.c +++ b/usr/src/lib/libc/port/gen/xgetwidth.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * _Xgetwidth calls _getwidth to get the values of environment variables @@ -39,7 +36,7 @@ */ /* #include "shlib.h" */ -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <euc.h> #include <getwidth.h> diff --git a/usr/src/lib/libc/port/i18n/__fputws_xpg5.c b/usr/src/lib/libc/port/i18n/__fputws_xpg5.c index 8bea02334b..46f39c0419 100644 --- a/usr/src/lib/libc/port/i18n/__fputws_xpg5.c +++ b/usr/src/lib/libc/port/i18n/__fputws_xpg5.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,17 +20,14 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * fputws transforms the process code string pointed to by "ptr" @@ -45,7 +41,7 @@ * the string in a series of smaller buffers. */ -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mse_int.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/i18n/_ctype.c b/usr/src/lib/libc/port/i18n/_ctype.c index fb66c5aaed..5d016393a2 100644 --- a/usr/src/lib/libc/port/i18n/_ctype.c +++ b/usr/src/lib/libc/port/i18n/_ctype.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,26 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #pragma weak _ctype = __ctype -#include "synonyms.h" +#include "lint.h" #include <locale.h> #include "_locale.h" #include <ctype.h> #include <sys/types.h> -unsigned char _ctype[SZ_TOTAL] = +unsigned char __ctype[SZ_TOTAL] = { 0, /* EOF */ _C, _C, _C, _C, _C, _C, _C, _C, diff --git a/usr/src/lib/libc/port/i18n/gettext.c b/usr/src/lib/libc/port/i18n/gettext.c index 8d05103cbd..1922edae04 100644 --- a/usr/src/lib/libc/port/i18n/gettext.c +++ b/usr/src/lib/libc/port/i18n/gettext.c @@ -20,23 +20,23 @@ */ /* - * Copyright 2007 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" -#pragma weak bindtextdomain = _bindtextdomain -#pragma weak textdomain = _textdomain -#pragma weak gettext = _gettext -#pragma weak dgettext = _dgettext -#pragma weak dcgettext = _dcgettext -#pragma weak ngettext = _ngettext -#pragma weak dngettext = _dngettext -#pragma weak dcngettext = _dcngettext -#pragma weak bind_textdomain_codeset = _bind_textdomain_codeset - -#include "synonyms.h" +#pragma weak _bindtextdomain = bindtextdomain +#pragma weak _textdomain = textdomain +#pragma weak _gettext = gettext +#pragma weak _dgettext = dgettext +#pragma weak _dcgettext = dcgettext +#pragma weak _ngettext = ngettext +#pragma weak _dngettext = dngettext +#pragma weak _dcngettext = dcngettext +#pragma weak _bind_textdomain_codeset = bind_textdomain_codeset + +#include "lint.h" #include "mtlib.h" #include <errno.h> #include <ctype.h> @@ -69,7 +69,7 @@ const char default_domain[] = DEFAULT_DOMAIN; Gettext_t *global_gt = NULL; char * -_bindtextdomain(const char *domain, const char *binding) +bindtextdomain(const char *domain, const char *binding) { char *res; @@ -81,7 +81,7 @@ _bindtextdomain(const char *domain, const char *binding) } char * -_bind_textdomain_codeset(const char *domain, const char *codeset) +bind_textdomain_codeset(const char *domain, const char *codeset) { char *res; @@ -97,7 +97,7 @@ _bind_textdomain_codeset(const char *domain, const char *codeset) * the active LC_MESSAGES locale category. */ char * -_textdomain(const char *domain) +textdomain(const char *domain) { char *res; char tmp_domain[TEXTDOMAINMAX + 1]; @@ -118,7 +118,7 @@ _textdomain(const char *domain) * for domain and LC_MESSAGES passed for category. */ char * -_gettext(const char *msg_id) +gettext(const char *msg_id) { char *res; int errno_save = errno; @@ -136,7 +136,7 @@ _gettext(const char *msg_id) * In dcgettext() call, domain is valid only for this call. */ char * -_dgettext(const char *domain, const char *msg_id) +dgettext(const char *domain, const char *msg_id) { char *res; int errno_save = errno; @@ -150,7 +150,7 @@ _dgettext(const char *domain, const char *msg_id) } char * -_dcgettext(const char *domain, const char *msg_id, const int category) +dcgettext(const char *domain, const char *msg_id, const int category) { char *res; int errno_save = errno; @@ -164,7 +164,7 @@ _dcgettext(const char *domain, const char *msg_id, const int category) } char * -_ngettext(const char *msgid1, const char *msgid2, unsigned long int n) +ngettext(const char *msgid1, const char *msgid2, unsigned long int n) { char *res; int errno_save = errno; @@ -178,7 +178,7 @@ _ngettext(const char *msgid1, const char *msgid2, unsigned long int n) } char * -_dngettext(const char *domain, const char *msgid1, const char *msgid2, +dngettext(const char *domain, const char *msgid1, const char *msgid2, unsigned long int n) { char *res; @@ -193,7 +193,7 @@ _dngettext(const char *domain, const char *msgid1, const char *msgid2, } char * -_dcngettext(const char *domain, const char *msgid1, const char *msgid2, +dcngettext(const char *domain, const char *msgid1, const char *msgid2, unsigned long int n, int category) { char *res; diff --git a/usr/src/lib/libc/port/i18n/gettext_gnu.c b/usr/src/lib/libc/port/i18n/gettext_gnu.c index 89be4bdd25..38ed4e40eb 100644 --- a/usr/src/lib/libc/port/i18n/gettext_gnu.c +++ b/usr/src/lib/libc/port/i18n/gettext_gnu.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <ctype.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/i18n/gettext_real.c b/usr/src/lib/libc/port/i18n/gettext_real.c index 516364835f..ff94e7fd70 100644 --- a/usr/src/lib/libc/port/i18n/gettext_real.c +++ b/usr/src/lib/libc/port/i18n/gettext_real.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <ctype.h> #include <locale.h> diff --git a/usr/src/lib/libc/port/i18n/gettext_util.c b/usr/src/lib/libc/port/i18n/gettext_util.c index f8982665af..d00c0edb4a 100644 --- a/usr/src/lib/libc/port/i18n/gettext_util.c +++ b/usr/src/lib/libc/port/i18n/gettext_util.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <ctype.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/i18n/isascii.c b/usr/src/lib/libc/port/i18n/isascii.c index 1c652c8434..5d48d642e3 100644 --- a/usr/src/lib/libc/port/i18n/isascii.c +++ b/usr/src/lib/libc/port/i18n/isascii.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak isascii = _isascii +#pragma weak _isascii = isascii int -_isascii(int c) +isascii(int c) { return (!(c & ~0177)); } diff --git a/usr/src/lib/libc/port/i18n/plural_parser.c b/usr/src/lib/libc/port/i18n/plural_parser.c index 2aef375292..408d1b558d 100644 --- a/usr/src/lib/libc/port/i18n/plural_parser.c +++ b/usr/src/lib/libc/port/i18n/plural_parser.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <ctype.h> #include <stdio.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/i18n/putws.c b/usr/src/lib/libc/port/i18n/putws.c index ad521c1124..cff6bc563c 100644 --- a/usr/src/lib/libc/port/i18n/putws.c +++ b/usr/src/lib/libc/port/i18n/putws.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Putws transforms process codes in wchar_t array pointed to by @@ -56,12 +53,12 @@ putws(const wchar_t *ptr) FLOCKFILE(lk, stdout); for (; *ptr; ptr++) { /* putwc till NULL */ - if (_fputwc(*ptr, stdout) == EOF) { + if (fputwc(*ptr, stdout) == EOF) { FUNLOCKFILE(lk); return (EOF); } } - (void) _fputwc('\n', stdout); /* append a new line */ + (void) fputwc('\n', stdout); /* append a new line */ FUNLOCKFILE(lk); if (fflush(stdout)) /* flush line */ diff --git a/usr/src/lib/libc/port/i18n/strtows.c b/usr/src/lib/libc/port/i18n/strtows.c index add9ed0ed7..52ee55cdec 100644 --- a/usr/src/lib/libc/port/i18n/strtows.c +++ b/usr/src/lib/libc/port/i18n/strtows.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <limits.h> #include <widec.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/i18n/toascii.c b/usr/src/lib/libc/port/i18n/toascii.c index 2e02fd4a59..6f06adfe54 100644 --- a/usr/src/lib/libc/port/i18n/toascii.c +++ b/usr/src/lib/libc/port/i18n/toascii.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak toascii = _toascii +#pragma weak _toascii = toascii int -_toascii(int c) +toascii(int c) { return ((c) & 0177); } diff --git a/usr/src/lib/libc/port/i18n/wcstoimax.c b/usr/src/lib/libc/port/i18n/wcstoimax.c index b9ab153303..50cfec4d6f 100644 --- a/usr/src/lib/libc/port/i18n/wcstoimax.c +++ b/usr/src/lib/libc/port/i18n/wcstoimax.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <stddef.h> #include <inttypes.h> #include <wchar.h> diff --git a/usr/src/lib/libc/port/i18n/wcstol.c b/usr/src/lib/libc/port/i18n/wcstol.c index d370951353..162feeddb2 100644 --- a/usr/src/lib/libc/port/i18n/wcstol.c +++ b/usr/src/lib/libc/port/i18n/wcstol.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,21 +20,20 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #ifndef _WCS_LONGLONG -#pragma weak wcstol = _wcstol +#pragma weak _wcstol = wcstol #endif -#include "synonyms.h" +#include "lint.h" #include <limits.h> #include <errno.h> #include <wchar.h> @@ -59,7 +57,7 @@ wcstoll(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr, int base) #else /* _WCS_LONGLONG */ long -_wcstol(const wchar_t *str, wchar_t **ptr, int base) +wcstol(const wchar_t *str, wchar_t **ptr, int base) #endif /* _WCS_LONGLONG */ { _WLONG_T val; diff --git a/usr/src/lib/libc/port/i18n/wcstoul.c b/usr/src/lib/libc/port/i18n/wcstoul.c index b67db3fd9a..58d501e189 100644 --- a/usr/src/lib/libc/port/i18n/wcstoul.c +++ b/usr/src/lib/libc/port/i18n/wcstoul.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,21 +20,20 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" #ifndef _WCS_LONGLONG -#pragma weak wcstoul = _wcstoul +#pragma weak _wcstoul = wcstoul #endif -#include "synonyms.h" +#include "lint.h" #include <limits.h> #include <errno.h> #include <wchar.h> @@ -57,7 +55,7 @@ wcstoull(const wchar_t *_RESTRICT_KYWD str, wchar_t **_RESTRICT_KYWD ptr, int base) #else /* _WCS_LONGLONG */ unsigned long -_wcstoul(const wchar_t *str, wchar_t **ptr, int base) +wcstoul(const wchar_t *str, wchar_t **ptr, int base) #endif /* _WCS_LONGLONG */ { _WULONG_T val; diff --git a/usr/src/lib/libc/port/i18n/wcswcs.c b/usr/src/lib/libc/port/i18n/wcswcs.c index 53bca5f6c6..e64ab9e25b 100644 --- a/usr/src/lib/libc/port/i18n/wcswcs.c +++ b/usr/src/lib/libc/port/i18n/wcswcs.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,30 +18,28 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Returns a pointer to the first occurrnce of ws1 in ws2. */ -#pragma weak wcswcs = _wcswcs +#pragma weak _wcswcs = wcswcs #include "lint.h" #include <stdlib.h> wchar_t * -_wcswcs(const wchar_t *ws1, const wchar_t *ws2) +wcswcs(const wchar_t *ws1, const wchar_t *ws2) { const wchar_t *s1, *s2; const wchar_t *tptr; diff --git a/usr/src/lib/libc/port/i18n/wdresolve.c b/usr/src/lib/libc/port/i18n/wdresolve.c index bb8d61c6c5..f5d137008d 100644 --- a/usr/src/lib/libc/port/i18n/wdresolve.c +++ b/usr/src/lib/libc/port/i18n/wdresolve.c @@ -20,13 +20,13 @@ */ /* - * Copyright 2007 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" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <ctype.h> diff --git a/usr/src/lib/libc/port/i18n/wmemcpy.c b/usr/src/lib/libc/port/i18n/wmemcpy.c index 1473b8cb8e..f12daea9d9 100644 --- a/usr/src/lib/libc/port/i18n/wmemcpy.c +++ b/usr/src/lib/libc/port/i18n/wmemcpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <wchar.h> #include <limits.h> @@ -43,7 +42,7 @@ wmemcpy(wchar_t *ws1, const wchar_t *ws2, size_t n) if (n <= max) { return ((wchar_t *)memcpy((void *)ws1, - (const void *)ws2, n * sizeof (wchar_t))); + (const void *)ws2, n * sizeof (wchar_t))); } p1 = ws1; @@ -55,7 +54,7 @@ wmemcpy(wchar_t *ws1, const wchar_t *ws2, size_t n) len = n; } (void) memcpy((void *)p1, - (const void *)p2, len * sizeof (wchar_t)); + (const void *)p2, len * sizeof (wchar_t)); n = n - len; p1 += len; p2 += len; diff --git a/usr/src/lib/libc/port/i18n/wmemmove.c b/usr/src/lib/libc/port/i18n/wmemmove.c index 86d016ceeb..6966be6f2d 100644 --- a/usr/src/lib/libc/port/i18n/wmemmove.c +++ b/usr/src/lib/libc/port/i18n/wmemmove.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <wchar.h> #include <limits.h> @@ -42,7 +41,7 @@ wmemmove(wchar_t *ws1, const wchar_t *ws2, size_t n) if (n <= max) { return ((wchar_t *)memmove((void *)ws1, - (const void *)ws2, n * sizeof (wchar_t))); + (const void *)ws2, n * sizeof (wchar_t))); } ows1 = ws1; diff --git a/usr/src/lib/libc/port/i18n/wscasecmp.c b/usr/src/lib/libc/port/i18n/wscasecmp.c index b3a04097d1..d3926bcc07 100644 --- a/usr/src/lib/libc/port/i18n/wscasecmp.c +++ b/usr/src/lib/libc/port/i18n/wscasecmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,7 +32,7 @@ * All letters are converted to the lowercase and compared. */ -#pragma weak wscasecmp = _wscasecmp +#pragma weak _wscasecmp = wscasecmp #include "lint.h" #include <stdlib.h> @@ -40,13 +40,13 @@ #include "libc.h" int -_wscasecmp(const wchar_t *s1, const wchar_t *s2) +wscasecmp(const wchar_t *s1, const wchar_t *s2) { if (s1 == s2) return (0); - while (_towlower(*s1) == _towlower(*s2++)) + while (towlower(*s1) == towlower(*s2++)) if (*s1++ == 0) return (0); - return (_towlower(*s1) - _towlower(*(s2 - 1))); + return (towlower(*s1) - towlower(*(s2 - 1))); } diff --git a/usr/src/lib/libc/port/i18n/wscat.c b/usr/src/lib/libc/port/i18n/wscat.c index 228e818b5a..eff4beb8a7 100644 --- a/usr/src/lib/libc/port/i18n/wscat.c +++ b/usr/src/lib/libc/port/i18n/wscat.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Concatenate s2 on the end of s1. S1's space must be large enough. * return s1. */ -#pragma weak wcscat = _wcscat -#pragma weak wscat = _wscat +#pragma weak _wcscat = wcscat +#pragma weak _wscat = wscat #include "lint.h" #include <stdlib.h> #include <wchar.h> wchar_t * -_wcscat(wchar_t *s1, const wchar_t *s2) +wcscat(wchar_t *s1, const wchar_t *s2) { wchar_t *os1 = s1; @@ -58,7 +55,7 @@ _wcscat(wchar_t *s1, const wchar_t *s2) } wchar_t * -_wscat(wchar_t *s1, const wchar_t *s2) +wscat(wchar_t *s1, const wchar_t *s2) { - return (_wcscat(s1, s2)); + return (wcscat(s1, s2)); } diff --git a/usr/src/lib/libc/port/i18n/wschr.c b/usr/src/lib/libc/port/i18n/wschr.c index 89308e6058..f57eafff85 100644 --- a/usr/src/lib/libc/port/i18n/wschr.c +++ b/usr/src/lib/libc/port/i18n/wschr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return the ptr in sp at which the character c appears; * Null if not found. */ -#pragma weak wcschr = _wcschr -#pragma weak wschr = _wschr +#pragma weak _wcschr = wcschr +#pragma weak _wschr = wschr #include "lint.h" #include <stdlib.h> #include <wchar.h> wchar_t * -_wcschr(const wchar_t *sp, wchar_t c) +wcschr(const wchar_t *sp, wchar_t c) { do { if (*sp == c) @@ -55,7 +52,7 @@ _wcschr(const wchar_t *sp, wchar_t c) } wchar_t * -_wschr(const wchar_t *sp, wchar_t c) +wschr(const wchar_t *sp, wchar_t c) { - return (_wcschr(sp, c)); + return (wcschr(sp, c)); } diff --git a/usr/src/lib/libc/port/i18n/wscmp.c b/usr/src/lib/libc/port/i18n/wscmp.c index 3f65e53843..a3c73a2114 100644 --- a/usr/src/lib/libc/port/i18n/wscmp.c +++ b/usr/src/lib/libc/port/i18n/wscmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,32 +18,30 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0 */ -#pragma weak wcscmp = _wcscmp -#pragma weak wscmp = _wscmp +#pragma weak _wcscmp = wcscmp +#pragma weak _wscmp = wscmp #include "lint.h" #include <stdlib.h> #include <wchar.h> int -_wcscmp(const wchar_t *s1, const wchar_t *s2) +wcscmp(const wchar_t *s1, const wchar_t *s2) { if (s1 == s2) return (0); @@ -56,7 +53,7 @@ _wcscmp(const wchar_t *s1, const wchar_t *s2) } int -_wscmp(const wchar_t *s1, const wchar_t *s2) +wscmp(const wchar_t *s1, const wchar_t *s2) { - return (_wcscmp(s1, s2)); + return (wcscmp(s1, s2)); } diff --git a/usr/src/lib/libc/port/i18n/wscpy.c b/usr/src/lib/libc/port/i18n/wscpy.c index 134d561d21..cab7faa736 100644 --- a/usr/src/lib/libc/port/i18n/wscpy.c +++ b/usr/src/lib/libc/port/i18n/wscpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,31 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Copy string s2 to s1. S1 must be large enough. * Return s1. */ -#pragma weak wcscpy = _wcscpy -#pragma weak wscpy = _wscpy +#pragma weak _wcscpy = wcscpy +#pragma weak _wscpy = wscpy #include "lint.h" #include <stdlib.h> #include <wchar.h> wchar_t * -_wcscpy(wchar_t *s1, const wchar_t *s2) +wcscpy(wchar_t *s1, const wchar_t *s2) { wchar_t *os1 = s1; @@ -53,7 +52,7 @@ _wcscpy(wchar_t *s1, const wchar_t *s2) } wchar_t * -_wscpy(wchar_t *s1, const wchar_t *s2) +wscpy(wchar_t *s1, const wchar_t *s2) { - return (_wcscpy(s1, s2)); + return (wcscpy(s1, s2)); } diff --git a/usr/src/lib/libc/port/i18n/wscspn.c b/usr/src/lib/libc/port/i18n/wscspn.c index 6276cc09ce..e3476595e3 100644 --- a/usr/src/lib/libc/port/i18n/wscspn.c +++ b/usr/src/lib/libc/port/i18n/wscspn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return the number of characters in the maximum leading segment * of string which consists solely of characters NOT from charset. */ -#pragma weak wcscspn = _wcscspn -#pragma weak wscspn = _wscspn +#pragma weak _wcscspn = wcscspn +#pragma weak _wscspn = wscspn #include "lint.h" #include <stdlib.h> #include <wchar.h> size_t -_wcscspn(const wchar_t *string, const wchar_t *charset) +wcscspn(const wchar_t *string, const wchar_t *charset) { const wchar_t *p, *q; @@ -59,7 +56,7 @@ _wcscspn(const wchar_t *string, const wchar_t *charset) } size_t -_wscspn(const wchar_t *string, const wchar_t *charset) +wscspn(const wchar_t *string, const wchar_t *charset) { - return (_wcscspn(string, charset)); + return (wcscspn(string, charset)); } diff --git a/usr/src/lib/libc/port/i18n/wsdup.c b/usr/src/lib/libc/port/i18n/wsdup.c index fd18793995..98d8a43d85 100644 --- a/usr/src/lib/libc/port/i18n/wsdup.c +++ b/usr/src/lib/libc/port/i18n/wsdup.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * string duplication @@ -47,6 +46,6 @@ wsdup(const wchar_t *s1) { wchar_t *s2; - s2 = malloc((_wcslen(s1) + 1) * sizeof (wchar_t)); - return (s2 == NULL ? NULL : _wcscpy(s2, s1)); + s2 = malloc((wcslen(s1) + 1) * sizeof (wchar_t)); + return (s2 == NULL ? NULL : wcscpy(s2, s1)); } diff --git a/usr/src/lib/libc/port/i18n/wslen.c b/usr/src/lib/libc/port/i18n/wslen.c index 6e6ad031de..1dc867b0a8 100644 --- a/usr/src/lib/libc/port/i18n/wslen.c +++ b/usr/src/lib/libc/port/i18n/wslen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,32 +18,30 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Returns the number of non-NULL characters in s. */ -#pragma weak wcslen = _wcslen -#pragma weak wslen = _wslen +#pragma weak _wcslen = wcslen +#pragma weak _wslen = wslen #include "lint.h" #include <stdlib.h> #include <wchar.h> size_t -_wcslen(const wchar_t *s) +wcslen(const wchar_t *s) { const wchar_t *s0 = s + 1; @@ -54,7 +51,7 @@ _wcslen(const wchar_t *s) } size_t -_wslen(const wchar_t *s) +wslen(const wchar_t *s) { - return (_wcslen(s)); + return (wcslen(s)); } diff --git a/usr/src/lib/libc/port/i18n/wsncasecmp.c b/usr/src/lib/libc/port/i18n/wsncasecmp.c index 2a68a4d316..f7603146fc 100644 --- a/usr/src/lib/libc/port/i18n/wsncasecmp.c +++ b/usr/src/lib/libc/port/i18n/wsncasecmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,7 +32,7 @@ * All letters are converted to the lowercase and compared. */ -#pragma weak wsncasecmp = _wsncasecmp +#pragma weak _wsncasecmp = wsncasecmp #include "lint.h" #include <stdlib.h> @@ -40,14 +40,14 @@ #include "libc.h" int -_wsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) +wsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) { if (s1 == s2) return (0); n++; - while (--n > 0 && _towlower(*s1) == _towlower(*s2++)) + while (--n > 0 && towlower(*s1) == towlower(*s2++)) if (*s1++ == 0) return (0); - return ((n == 0) ? 0 : (_towlower(*s1) - _towlower(*(s2 - 1)))); + return ((n == 0) ? 0 : (towlower(*s1) - towlower(*(s2 - 1)))); } diff --git a/usr/src/lib/libc/port/i18n/wsncat.c b/usr/src/lib/libc/port/i18n/wsncat.c index ab95a591c0..6cb78abb07 100644 --- a/usr/src/lib/libc/port/i18n/wsncat.c +++ b/usr/src/lib/libc/port/i18n/wsncat.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Concatenate s2 on the end of s1. S1's space must be large enough. @@ -38,15 +35,15 @@ * return s1. */ -#pragma weak wcsncat = _wcsncat -#pragma weak wsncat = _wsncat +#pragma weak _wcsncat = wcsncat +#pragma weak _wsncat = wsncat #include "lint.h" #include <stdlib.h> #include <wchar.h> wchar_t * -_wcsncat(wchar_t *s1, const wchar_t *s2, size_t n) +wcsncat(wchar_t *s1, const wchar_t *s2, size_t n) { wchar_t *os1 = s1; @@ -63,7 +60,7 @@ _wcsncat(wchar_t *s1, const wchar_t *s2, size_t n) } wchar_t * -_wsncat(wchar_t *s1, const wchar_t *s2, size_t n) +wsncat(wchar_t *s1, const wchar_t *s2, size_t n) { - return (_wcsncat(s1, s2, n)); + return (wcsncat(s1, s2, n)); } diff --git a/usr/src/lib/libc/port/i18n/wsncmp.c b/usr/src/lib/libc/port/i18n/wsncmp.c index 590480f264..2f882a1fad 100644 --- a/usr/src/lib/libc/port/i18n/wsncmp.c +++ b/usr/src/lib/libc/port/i18n/wsncmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Compare strings (at most n characters) * returns: s1>s2: >0 s1==s2: 0 s1<s2: <0 */ -#pragma weak wcsncmp = _wcsncmp -#pragma weak wsncmp = _wsncmp +#pragma weak _wcsncmp = wcsncmp +#pragma weak _wsncmp = wsncmp #include "lint.h" #include <stdlib.h> #include <wchar.h> int -_wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n) +wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n) { if (s1 == s2) return (0); @@ -58,7 +55,7 @@ _wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n) } int -_wsncmp(const wchar_t *s1, const wchar_t *s2, size_t n) +wsncmp(const wchar_t *s1, const wchar_t *s2, size_t n) { - return (_wcsncmp(s1, s2, n)); + return (wcsncmp(s1, s2, n)); } diff --git a/usr/src/lib/libc/port/i18n/wsncpy.c b/usr/src/lib/libc/port/i18n/wsncpy.c index 67f1701316..8161863b74 100644 --- a/usr/src/lib/libc/port/i18n/wsncpy.c +++ b/usr/src/lib/libc/port/i18n/wsncpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Copy s2 to s1, truncating or null-padding to always copy n characters. * Return s1. */ -#pragma weak wcsncpy = _wcsncpy -#pragma weak wsncpy = _wsncpy +#pragma weak _wcsncpy = wcsncpy +#pragma weak _wsncpy = wsncpy #include "lint.h" #include <stdlib.h> #include <wchar.h> wchar_t * -_wcsncpy(wchar_t *s1, const wchar_t *s2, size_t n) +wcsncpy(wchar_t *s1, const wchar_t *s2, size_t n) { wchar_t *os1 = s1; @@ -59,7 +56,7 @@ _wcsncpy(wchar_t *s1, const wchar_t *s2, size_t n) } wchar_t * -_wsncpy(wchar_t *s1, const wchar_t *s2, size_t n) +wsncpy(wchar_t *s1, const wchar_t *s2, size_t n) { - return (_wcsncpy(s1, s2, n)); + return (wcsncpy(s1, s2, n)); } diff --git a/usr/src/lib/libc/port/i18n/wspbrk.c b/usr/src/lib/libc/port/i18n/wspbrk.c index fd7f106c3a..283fd13c81 100644 --- a/usr/src/lib/libc/port/i18n/wspbrk.c +++ b/usr/src/lib/libc/port/i18n/wspbrk.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return ptr to first occurance of any character from 'brkset' * in the wchar_t array 'string'; NULL if none exists. */ -#pragma weak wcspbrk = _wcspbrk -#pragma weak wspbrk = _wspbrk +#pragma weak _wcspbrk = wcspbrk +#pragma weak _wspbrk = wspbrk #include "lint.h" #include <stdlib.h> #include <wchar.h> wchar_t * -_wcspbrk(const wchar_t *string, const wchar_t *brkset) +wcspbrk(const wchar_t *string, const wchar_t *brkset) { const wchar_t *p; @@ -59,7 +56,7 @@ _wcspbrk(const wchar_t *string, const wchar_t *brkset) } wchar_t * -_wspbrk(const wchar_t *string, const wchar_t *brkset) +wspbrk(const wchar_t *string, const wchar_t *brkset) { - return (_wcspbrk(string, brkset)); + return (wcspbrk(string, brkset)); } diff --git a/usr/src/lib/libc/port/i18n/wsprintf.c b/usr/src/lib/libc/port/i18n/wsprintf.c index dd82d9a475..40f30088e9 100644 --- a/usr/src/lib/libc/port/i18n/wsprintf.c +++ b/usr/src/lib/libc/port/i18n/wsprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,17 +20,16 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <stdarg.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/i18n/wsrchr.c b/usr/src/lib/libc/port/i18n/wsrchr.c index 886dd19866..56bd96290f 100644 --- a/usr/src/lib/libc/port/i18n/wsrchr.c +++ b/usr/src/lib/libc/port/i18n/wsrchr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,33 +18,31 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return the ptr in sp at which the character c last appears; * Null if not found. */ -#pragma weak wcsrchr = _wcsrchr -#pragma weak wsrchr = _wsrchr +#pragma weak _wcsrchr = wcsrchr +#pragma weak _wsrchr = wsrchr #include "lint.h" #include <stdlib.h> #include <wchar.h> wchar_t * -_wcsrchr(const wchar_t *sp, wchar_t c) +wcsrchr(const wchar_t *sp, wchar_t c) { const wchar_t *r = NULL; @@ -57,7 +54,7 @@ _wcsrchr(const wchar_t *sp, wchar_t c) } wchar_t * -_wsrchr(const wchar_t *sp, wchar_t c) +wsrchr(const wchar_t *sp, wchar_t c) { - return (_wcsrchr(sp, c)); + return (wcsrchr(sp, c)); } diff --git a/usr/src/lib/libc/port/i18n/wsscanf.c b/usr/src/lib/libc/port/i18n/wsscanf.c index 1d04631b8c..c0f8351326 100644 --- a/usr/src/lib/libc/port/i18n/wsscanf.c +++ b/usr/src/lib/libc/port/i18n/wsscanf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <stdio.h> #include <stdarg.h> diff --git a/usr/src/lib/libc/port/i18n/wstod.c b/usr/src/lib/libc/port/i18n/wstod.c index df7a872f9e..0be95caf13 100644 --- a/usr/src/lib/libc/port/i18n/wstod.c +++ b/usr/src/lib/libc/port/i18n/wstod.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,26 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * This file is based on /usr/src/lib/libc/port/gen/strtod.c and * /usr/src/lib/libc/sparc/fp/string_decim.c */ -#pragma weak wcstod = _wcstod -#pragma weak wstod = _wstod +#pragma weak _wcstod = wcstod +#pragma weak _wstod = wstod -#include "synonyms.h" +#include "lint.h" #include <errno.h> #include <stdio.h> #include <values.h> @@ -53,7 +52,7 @@ static void wstring_to_decimal(const wchar_t **, int, decimal_record *, int *); double -_wcstod(const wchar_t *cp, wchar_t **ptr) +wcstod(const wchar_t *cp, wchar_t **ptr) { double x; decimal_mode mr; @@ -147,9 +146,9 @@ wcstold(const wchar_t *cp, wchar_t **ptr) } double -_wstod(const wchar_t *cp, wchar_t **ptr) +wstod(const wchar_t *cp, wchar_t **ptr) { - return (_wcstod(cp, ptr)); + return (wcstod(cp, ptr)); } static const char *infstring = "INFINITY"; diff --git a/usr/src/lib/libc/port/i18n/wstok.c b/usr/src/lib/libc/port/i18n/wstok.c index d0f109aa7c..140d500ff2 100644 --- a/usr/src/lib/libc/port/i18n/wstok.c +++ b/usr/src/lib/libc/port/i18n/wstok.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,17 +20,14 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ - -/* This module is created for NLS on Sep.03.86 */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * uses wcspbrk and wcsspn to break string into tokens on @@ -40,9 +36,9 @@ * 'subsequent' calls are calls with first argument WNULL. */ -#pragma weak wstok = _wstok +#pragma weak _wstok = wstok -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "mse_int.h" #include <stdlib.h> @@ -87,7 +83,7 @@ wcstok(wchar_t *string, const wchar_t *sepset) } wchar_t * -_wstok(wchar_t *string, const wchar_t *sepset) +wstok(wchar_t *string, const wchar_t *sepset) { return (wcstok(string, sepset)); } diff --git a/usr/src/lib/libc/port/i18n/wstol.c b/usr/src/lib/libc/port/i18n/wstol.c index 78af1651c4..2dd8f80df8 100644 --- a/usr/src/lib/libc/port/i18n/wstol.c +++ b/usr/src/lib/libc/port/i18n/wstol.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,24 +20,23 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak wstol = _wstol +#pragma weak _wstol = wstol -#include "synonyms.h" +#include "lint.h" #include <widec.h> #include <wchar.h> long -_wstol(const wchar_t *str, wchar_t **ptr, int base) +wstol(const wchar_t *str, wchar_t **ptr, int base) { return (wcstol(str, ptr, base)); } diff --git a/usr/src/lib/libc/port/i18n/wstoll.c b/usr/src/lib/libc/port/i18n/wstoll.c index d528d319cd..e732c2bbc6 100644 --- a/usr/src/lib/libc/port/i18n/wstoll.c +++ b/usr/src/lib/libc/port/i18n/wstoll.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,19 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1986 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak wstoll = _wstoll -#pragma weak watoll = _watoll +#pragma weak _wstoll = wstoll +#pragma weak _watoll = watoll #include "lint.h" #include <wchar.h> @@ -48,13 +47,13 @@ * PSARC opinion: PSARC/1993/121, approved on 3/11/93 */ long long -_watoll(const wchar_t *p) +watoll(const wchar_t *p) { return (wcstoll(p, NULL, 10)); } long long -_wstoll(const wchar_t *str, wchar_t **ptr, int base) +wstoll(const wchar_t *str, wchar_t **ptr, int base) { return (wcstoll(str, ptr, base)); } diff --git a/usr/src/lib/libc/port/i18n/wsxfrm.c b/usr/src/lib/libc/port/i18n/wsxfrm.c index 12f8dcb7e8..fd1b25073e 100644 --- a/usr/src/lib/libc/port/i18n/wsxfrm.c +++ b/usr/src/lib/libc/port/i18n/wsxfrm.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,21 +29,21 @@ /* This is Sun's propriatry implementation of wsxfrm() and wscoll() */ /* using dynamic linking. It is probably free from AT&T copyright. */ -#pragma weak wscoll = _wscoll -#pragma weak wsxfrm = _wsxfrm +#pragma weak _wscoll = wscoll +#pragma weak _wsxfrm = wsxfrm #include "lint.h" #include <wchar.h> #include "libc.h" size_t -_wsxfrm(wchar_t *s1, const wchar_t *s2, size_t n) +wsxfrm(wchar_t *s1, const wchar_t *s2, size_t n) { - return (_wcsxfrm(s1, s2, n)); + return (wcsxfrm(s1, s2, n)); } int -_wscoll(const wchar_t *s1, const wchar_t *s2) +wscoll(const wchar_t *s1, const wchar_t *s2) { - return (_wcscoll(s1, s2)); + return (wcscoll(s1, s2)); } diff --git a/usr/src/lib/libc/port/llib-lc b/usr/src/lib/libc/port/llib-lc index d312d2cd39..c8c62dfa7e 100644 --- a/usr/src/lib/libc/port/llib-lc +++ b/usr/src/lib/libc/port/llib-lc @@ -799,7 +799,8 @@ int remove(const char *filename); int rename(const char *old, const char *new); /* rewinddir.c */ -void _rewinddir(DIR *dirp); +#undef rewinddir +void rewinddir(DIR *dirp); /* scandir.c */ int alphasort(const struct dirent **, const struct dirent **); diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers index 54c8ad230a..bb34032d24 100644 --- a/usr/src/lib/libc/port/mapfile-vers +++ b/usr/src/lib/libc/port/mapfile-vers @@ -79,16 +79,12 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11) forkx; fsetattr; getattrat; - _getpagesizes; getpagesizes2; - _getpagesizes2; htonl; htons; lio_listio; mkdtemp; - _mkdtemp; mkstemps; - _mkstemps; mq_close; mq_getattr; mq_notify; @@ -106,7 +102,6 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11) ntohs; posix_fallocate; pthread_key_create_once_np; - _renameat; sched_getparam; sched_get_priority_max; sched_get_priority_min; @@ -134,7 +129,7 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11) sigtimedwait; sigwaitinfo; strnlen; - thr_keycreate_once = NODYNSORT; + thr_keycreate_once; timer_create; timer_delete; timer_getoverrun; @@ -410,7 +405,7 @@ SUNW_1.22 { # SunOS 5.10 (Solaris 10) pthread_condattr_setclock; pthread_mutexattr_getrobust_np; pthread_mutexattr_setrobust_np; - pthread_mutex_consistent_np = NODYNSORT; + pthread_mutex_consistent_np; pthread_mutex_reltimedlock_np; pthread_mutex_timedlock; pthread_rwlock_reltimedrdlock_np; @@ -427,7 +422,7 @@ SUNW_1.22 { # SunOS 5.10 (Solaris 10) scandir; _scandir; schedctl_exit; - schedctl_init = NODYNSORT; + schedctl_init; schedctl_lookup; sema_reltimedwait; sema_timedwait; @@ -1016,7 +1011,7 @@ SUNW_0.9 { # SunOS 5.5 (Solaris 2.5) setreuid; setstate; srandom; - thr_min_stack = NODYNSORT; + thr_min_stack; thr_stksegment; ualarm; usleep; @@ -1073,18 +1068,18 @@ SUNW_0.8 { # SunOS 5.4 (Solaris 2.4) strptime; thr_continue; thr_create; - thr_exit = NODYNSORT; + thr_exit; thr_getconcurrency; thr_getprio; thr_getspecific; thr_join; - thr_keycreate = NODYNSORT; - thr_kill = NODYNSORT; + thr_keycreate; + thr_kill; thr_self = NODYNSORT; thr_setconcurrency; - thr_setprio = NODYNSORT; - thr_setspecific = NODYNSORT; - thr_sigsetmask = NODYNSORT; + thr_setprio; + thr_setspecific; + thr_sigsetmask; thr_suspend; thr_yield; vlfmt; @@ -1336,9 +1331,9 @@ SUNWprivate_1.1 { __libc_threaded; _lib_version = NODIRECT; _logb = FUNCTION FILTER libm.so.2; - _lone = NODYNSORT; - _lten; - _lzero = NODYNSORT; + _lone = NODYNSORT; + _lten = NODYNSORT; + _lzero = NODYNSORT; __malloc_lock; _modff = FUNCTION FILTER libm.so.2; __nan_read; @@ -1362,179 +1357,39 @@ SUNWprivate_1.1 { __xpg6 = NODIRECT; protected: __accessat; - _a64l; acctctl; - _acctctl; - _acl; - _adjtime; allocids; - _ascftime; - _asctime_r; _assert_c99; __assert_c99; _assfail; - _atoll; - _atomic_add_16 = NODYNSORT; - _atomic_add_16_nv = NODYNSORT; - _atomic_add_32 = NODYNSORT; - _atomic_add_32_nv = NODYNSORT; - _atomic_add_64 = NODYNSORT; - _atomic_add_64_nv = NODYNSORT; - _atomic_add_8 = NODYNSORT; - _atomic_add_8_nv = NODYNSORT; - _atomic_add_char = NODYNSORT; - _atomic_add_char_nv = NODYNSORT; - _atomic_add_int = NODYNSORT; - _atomic_add_int_nv = NODYNSORT; - _atomic_add_long = NODYNSORT; - _atomic_add_long_nv = NODYNSORT; - _atomic_add_ptr = NODYNSORT; - _atomic_add_ptr_nv = NODYNSORT; - _atomic_add_short = NODYNSORT; - _atomic_add_short_nv = NODYNSORT; - _atomic_and_16 = NODYNSORT; - _atomic_and_16_nv = NODYNSORT; - _atomic_and_32 = NODYNSORT; - _atomic_and_32_nv = NODYNSORT; - _atomic_and_64 = NODYNSORT; - _atomic_and_64_nv = NODYNSORT; - _atomic_and_8 = NODYNSORT; - _atomic_and_8_nv = NODYNSORT; - _atomic_and_uchar = NODYNSORT; - _atomic_and_uchar_nv = NODYNSORT; - _atomic_and_uint = NODYNSORT; - _atomic_and_uint_nv = NODYNSORT; - _atomic_and_ulong = NODYNSORT; - _atomic_and_ulong_nv = NODYNSORT; - _atomic_and_ushort = NODYNSORT; - _atomic_and_ushort_nv = NODYNSORT; - _atomic_cas_16 = NODYNSORT; - _atomic_cas_32 = NODYNSORT; - _atomic_cas_64 = NODYNSORT; - _atomic_cas_8 = NODYNSORT; - _atomic_cas_ptr = NODYNSORT; - _atomic_cas_uchar = NODYNSORT; - _atomic_cas_uint = NODYNSORT; - _atomic_cas_ulong = NODYNSORT; - _atomic_cas_ushort = NODYNSORT; - _atomic_clear_long_excl = NODYNSORT; - _atomic_dec_16 = NODYNSORT; - _atomic_dec_16_nv = NODYNSORT; - _atomic_dec_32 = NODYNSORT; - _atomic_dec_32_nv = NODYNSORT; - _atomic_dec_64 = NODYNSORT; - _atomic_dec_64_nv = NODYNSORT; - _atomic_dec_8 = NODYNSORT; - _atomic_dec_8_nv = NODYNSORT; - _atomic_dec_uchar = NODYNSORT; - _atomic_dec_uchar_nv = NODYNSORT; - _atomic_dec_uint = NODYNSORT; - _atomic_dec_uint_nv = NODYNSORT; - _atomic_dec_ulong = NODYNSORT; - _atomic_dec_ulong_nv = NODYNSORT; - _atomic_dec_ushort = NODYNSORT; - _atomic_dec_ushort_nv = NODYNSORT; - _atomic_inc_16 = NODYNSORT; - _atomic_inc_16_nv = NODYNSORT; - _atomic_inc_32 = NODYNSORT; - _atomic_inc_32_nv = NODYNSORT; - _atomic_inc_64 = NODYNSORT; - _atomic_inc_64_nv = NODYNSORT; - _atomic_inc_8 = NODYNSORT; - _atomic_inc_8_nv = NODYNSORT; - _atomic_inc_uchar = NODYNSORT; - _atomic_inc_uchar_nv = NODYNSORT; - _atomic_inc_uint = NODYNSORT; - _atomic_inc_uint_nv = NODYNSORT; - _atomic_inc_ulong = NODYNSORT; - _atomic_inc_ulong_nv = NODYNSORT; - _atomic_inc_ushort = NODYNSORT; - _atomic_inc_ushort_nv = NODYNSORT; - _atomic_or_16 = NODYNSORT; - _atomic_or_16_nv = NODYNSORT; - _atomic_or_32 = NODYNSORT; - _atomic_or_32_nv = NODYNSORT; - _atomic_or_64 = NODYNSORT; - _atomic_or_64_nv = NODYNSORT; - _atomic_or_8 = NODYNSORT; - _atomic_or_8_nv = NODYNSORT; - _atomic_or_uchar = NODYNSORT; - _atomic_or_uchar_nv = NODYNSORT; - _atomic_or_uint = NODYNSORT; - _atomic_or_uint_nv = NODYNSORT; - _atomic_or_ulong = NODYNSORT; - _atomic_or_ulong_nv = NODYNSORT; - _atomic_or_ushort = NODYNSORT; - _atomic_or_ushort_nv = NODYNSORT; - _atomic_set_long_excl = NODYNSORT; - _atomic_swap_16 = NODYNSORT; - _atomic_swap_32 = NODYNSORT; - _atomic_swap_64 = NODYNSORT; - _atomic_swap_8 = NODYNSORT; - _atomic_swap_ptr = NODYNSORT; - _atomic_swap_uchar = NODYNSORT; - _atomic_swap_uint = NODYNSORT; - _atomic_swap_ulong = NODYNSORT; - _atomic_swap_ushort = NODYNSORT; attr_count; attr_to_data_type; attr_to_name; attr_to_option; attr_to_xattr_view; _autofssys; - _brk; __btowc_dense; __btowc_euc; __btowc_sb; _bufsync; - _cftime; __charmap_init; _cladm; - __cladm; __class_quadruple; - _clock_getres; - _clock_gettime; - _clock_nanosleep; - _clock_settime; - _closelog; __collate_init; - _cond_broadcast = NODYNSORT; - _cond_destroy = NODYNSORT; - _cond_init; - _cond_reltimedwait; - _cond_signal = NODYNSORT; - _cond_timedwait; - _cond_wait; core_get_default_content; - _core_get_default_content; core_get_default_path; - _core_get_default_path; core_get_global_content; - _core_get_global_content; core_get_global_path; - _core_get_global_path; core_get_options; - _core_get_options; core_get_process_content; - _core_get_process_content; core_get_process_path; - _core_get_process_path; core_set_default_content; - _core_set_default_content; core_set_default_path; - _core_set_default_path; core_set_global_content; - _core_set_global_content; core_set_global_path; - _core_set_global_path; core_set_options; - _core_set_options; core_set_process_content; - _core_set_process_content; core_set_process_path; - _core_set_process_path; - _ctermid_r; - _ctime_r; __ctype_init; dbm_close_status; dbm_do_nextkey; @@ -1543,85 +1398,33 @@ SUNWprivate_1.1 { _D_cplx_div_ix; _D_cplx_div_rx; _D_cplx_mul; - _decimal_to_double; - _decimal_to_extended; - _decimal_to_quadruple; - _decimal_to_single; defcntl; - _defcntl; defopen; - _defopen; defread; - _defread; _delete; _dgettext; - _dirfd; - _door_bind = NODYNSORT; - _door_call = NODYNSORT; - _door_create; - _door_cred; - _door_getparam = NODYNSORT; - _door_info = NODYNSORT; - _door_return; - _door_revoke = NODYNSORT; - _door_server_create; - _door_setparam = NODYNSORT; - _door_ucred; - _door_unbind = NODYNSORT; _doprnt; _doscan; - _double_to_decimal; - _drand48; - _econvert; - _ecvt; - _endgrent; - _endpwent; - _endspent; - _endutent; - _endutxent; - _erand48; - _err; _errfp; - _errx; _errxfp; __eucpctowc_gen; exportfs; - _exportfs; - _extended_to_decimal; - _facl; - _fchroot; - _fconvert; _F_cplx_div; _F_cplx_div_ix; _F_cplx_div_rx; _F_cplx_mul; - _fcvt; - _fdatasync; - _ffs; - _fgetgrent; - _fgetgrent_r; - _fgetpwent; - _fgetpwent_r; - _fgetspent; - _fgetspent_r; __fgetwc_dense; __fgetwc_euc; __fgetwc_sb; __fgetwc_xpg5; __fgetws_xpg5; - _file_to_decimal; _findbuf; _findiop; __fini_daemon_priv; _finite; - _flockfile; __fnmatch_C; __fnmatch_sb; __fnmatch_std; - _fork1 = NODYNSORT; - _forkall; - _forkallx = NODYNSORT; - _forkx = NODYNSORT; _fpclass; _fpgetmask; _fpgetround; @@ -1632,83 +1435,34 @@ SUNWprivate_1.1 { _fpsetsticky; __fputwc_xpg5; __fputws_xpg5; - _fstatfs; - _ftruncate; - _ftrylockfile; _ftw; - _func_to_decimal; - _funlockfile; - _gconvert; _gcvt; _getarg; - _getchar_unlocked; __getcontext; - _getc_unlocked; __getdate_std; _getdents; _get_exit_frame_monitor; _getfp; - _getgrent; - _getgrent_r; - _getgrgid_r; - _getgrnam_r; _getgroupsbymember; - __getloadavg; _getlogin_r; - _getmntany; - _getmntent; - _getpw; - _getpwent; - _getpwent_r; - _getpwnam_r; - _getpwuid_r; _getsp; - _getspent; - _getspent_r; - _getspnam; - _getspnam_r; __gettsp; - _getutent; - _getutid; - _getutline; - _getutmp; - _getutmpx; - _getutxent; - _getutxid; - _getutxline; - _getvfsany; - _getvfsent; - _getvfsfile; - _getvfsspec; getvmusage; __getwchar_xpg5; __getwc_xpg5; - _getzoneid; - _getzoneidbyname; - _getzonenamebyid; - _gmtime_r; - _gsignal; gtty; - _gtty; - _hasmntopt; - _iconv; - _iconv_close; - _iconv_open; idmap_reg; idmap_unreg; __init_daemon_priv; __init_suid_priv; _insert; inst_sync; - _inst_sync; _is_euc_fc; _is_euc_pc; - _is_system_labeled; _iswctype; __iswctype_bc; __iswctype_sb; __iswctype_std; - _jrand48; klpd_create; klpd_getpath; klpd_getport; @@ -1717,52 +1471,17 @@ SUNWprivate_1.1 { klpd_register_id; klpd_unregister; klpd_unregister_id; - _l64a; - _ladd; - _lckpwdf; - _lcong48; - _ldivide; - _lexp10; _lgrp_home_fast = NODYNSORT; _lgrpsys; - _llabs; - _lldiv; - _llog10; - _llseek; _lltostr; - _lmul; __localeconv_std; __locale_init; - _localtime_r; _lock_clear; _lock_try; - _lrand48; - _lshiftl; - _lsub; _ltzset; - __lwp_cond_broadcast; - __lwp_cond_reltimedwait; - __lwp_cond_signal; - __lwp_cond_timedwait; - __lwp_cond_wait; - __lwp_continue; - __lwp_info; - __lwp_kill; - __lwp_mutex_lock; - __lwp_mutex_trylock; - __lwp_mutex_unlock; lwp_self; - __lwp_self; - __lwp_sema_init; - __lwp_sema_post; - __lwp_sema_trywait; - __lwp_sema_wait; - __lwp_suspend; - _madvise; makeut; - _makeut; makeutx; - _makeutx; _mbftowc; __mbftowc_dense; __mbftowc_euc; @@ -1791,55 +1510,29 @@ SUNWprivate_1.1 { __mbtowc_euc; __mbtowc_sb; mcfiller; - _membar_consumer; - _membar_enter = NODYNSORT; - _membar_exit = NODYNSORT; - _membar_producer = NODYNSORT; __messages_init; - _mincore; _mkarglst; - _mlockall; mntopt; modctl; modutx; - _modutx; __monetary_init; - _mrand48; msgctl64; - _msgctl64; __multi_innetgr; - _munlockall; - _mutex_consistent = NODYNSORT; - __mutex_consistent = NODYNSORT; _mutex_destroy = NODYNSORT; - __mutex_destroy; mutex_held; - __mutex_held = NODYNSORT; _mutex_init = NODYNSORT; - __mutex_init; - __mutex_lock; - _mutex_trylock = NODYNSORT; - __mutex_trylock; _mutex_unlock = NODYNSORT; - __mutex_unlock; name_to_attr; - _nanosleep; nfs_getfh; - _nfs_getfh; nfssvc; - _nfssvc; _nfssys; __nis_get_environment; __nl_langinfo_std; - _nrand48; _nss_db_state_destr; nss_default_key2str; nss_delete; - _nss_delete; nss_endent; - _nss_endent; nss_getent; - _nss_getent; _nss_initf_group; _nss_initf_netgroup; _nss_initf_passwd; @@ -1849,9 +1542,7 @@ SUNWprivate_1.1 { nss_packed_getkey; nss_packed_set_status; nss_search; - _nss_search; nss_setent; - _nss_setent; _nss_XbyY_fgets; __nsw_extended_action_v1; __nsw_freeconfig_v1; @@ -1860,178 +1551,16 @@ SUNWprivate_1.1 { __numeric_init; __openattrdirat; option_to_attr; - _openlog; - _plock; - _port_alert; - _port_associate; - _port_create; - _port_dissociate; - _port_get; - _port_getn; - _port_send; - _port_sendn; - _posix_openpt; - _posix_spawn; - _posix_spawnattr_destroy; - _posix_spawnattr_getflags; - _posix_spawnattr_getpgroup; - _posix_spawnattr_getschedparam; - _posix_spawnattr_getschedpolicy; - _posix_spawnattr_getsigdefault; - _posix_spawnattr_getsigmask; - _posix_spawnattr_init; - _posix_spawnattr_setflags; - _posix_spawnattr_setpgroup; - _posix_spawnattr_setschedparam; - _posix_spawnattr_setschedpolicy; - _posix_spawnattr_setsigdefault; - _posix_spawnattr_setsigmask; - _posix_spawn_file_actions_addclose; - _posix_spawn_file_actions_adddup2; - _posix_spawn_file_actions_addopen; - _posix_spawn_file_actions_destroy; - _posix_spawn_file_actions_init; - _posix_spawnp; - _pread; - _printstack; __priv_bracket; __priv_relinquish; - _pselect; pset_assign_forced; - _psiginfo; _psignal; - _pthread_atfork = NODYNSORT; - _pthread_attr_destroy; - _pthread_attr_getdetachstate; - _pthread_attr_getguardsize; - _pthread_attr_getinheritsched; - _pthread_attr_getschedparam; - _pthread_attr_getschedpolicy; - _pthread_attr_getscope; - _pthread_attr_getstack; - _pthread_attr_getstackaddr; - _pthread_attr_getstacksize; - _pthread_attr_init; - _pthread_attr_setdetachstate; - _pthread_attr_setguardsize; - _pthread_attr_setinheritsched; - _pthread_attr_setschedparam; - _pthread_attr_setschedpolicy; - _pthread_attr_setscope; - _pthread_attr_setstack; - _pthread_attr_setstackaddr; - _pthread_attr_setstacksize; - _pthread_barrierattr_destroy; - _pthread_barrierattr_getpshared; - _pthread_barrierattr_init; - _pthread_barrierattr_setpshared; - _pthread_barrier_destroy; - _pthread_barrier_init; - _pthread_barrier_wait; - _pthread_cancel; - _pthread_condattr_destroy; - _pthread_condattr_getclock; - _pthread_condattr_getpshared; - _pthread_condattr_init; - _pthread_condattr_setclock; - _pthread_condattr_setpshared; - _pthread_cond_broadcast = NODYNSORT; - _pthread_cond_destroy = NODYNSORT; - _pthread_cond_init; - _pthread_cond_reltimedwait_np; - _pthread_cond_signal = NODYNSORT; - _pthread_cond_timedwait; - _pthread_cond_wait; - _pthread_create; - _pthread_detach = NODYNSORT; - _pthread_equal; - _pthread_exit = NODYNSORT; - _pthread_getconcurrency; - _pthread_getschedparam; - _pthread_getspecific; - _pthread_join; - _pthread_key_create = NODYNSORT; - _pthread_key_create_once_np = NODYNSORT; - _pthread_key_delete = NODYNSORT; - _pthread_kill = NODYNSORT; - __pthread_min_stack; - _pthread_mutexattr_destroy; - _pthread_mutexattr_getprioceiling; - _pthread_mutexattr_getprotocol; - _pthread_mutexattr_getpshared; - _pthread_mutexattr_getrobust_np; - _pthread_mutexattr_gettype; - _pthread_mutexattr_init; - _pthread_mutexattr_setprioceiling; - _pthread_mutexattr_setprotocol; - _pthread_mutexattr_setpshared; - _pthread_mutexattr_setrobust_np; - _pthread_mutexattr_settype; - _pthread_mutex_consistent_np = NODYNSORT; - _pthread_mutex_destroy = NODYNSORT; - _pthread_mutex_getprioceiling; - _pthread_mutex_init; - _pthread_mutex_lock = NODYNSORT; - _pthread_mutex_reltimedlock_np; - _pthread_mutex_setprioceiling; - _pthread_mutex_timedlock; - _pthread_mutex_trylock = NODYNSORT; - _pthread_mutex_unlock = NODYNSORT; - _pthread_once; - _pthread_rwlockattr_destroy; - _pthread_rwlockattr_getpshared; - _pthread_rwlockattr_init; - _pthread_rwlockattr_setpshared; - _pthread_rwlock_destroy = NODYNSORT; - _pthread_rwlock_init = NODYNSORT; - _pthread_rwlock_rdlock = NODYNSORT; - _pthread_rwlock_reltimedrdlock_np; - _pthread_rwlock_reltimedwrlock_np; - _pthread_rwlock_timedrdlock; - _pthread_rwlock_timedwrlock; - _pthread_rwlock_tryrdlock = NODYNSORT; - _pthread_rwlock_trywrlock = NODYNSORT; - _pthread_rwlock_unlock = NODYNSORT; - _pthread_rwlock_wrlock = NODYNSORT; - _pthread_self = NODYNSORT; - _pthread_setcancelstate; - _pthread_setcanceltype; _pthread_setcleanupinit; - _pthread_setconcurrency; - _pthread_setschedparam; - _pthread_setschedprio = NODYNSORT; - _pthread_setspecific = NODYNSORT; - _pthread_sigmask = NODYNSORT; - _pthread_spin_destroy; - _pthread_spin_init; - _pthread_spin_lock; - _pthread_spin_trylock; - _pthread_spin_unlock; - _pthread_testcancel; - _putchar_unlocked; - _putc_unlocked; - _putpwent; - _putspent; - _pututline; - _pututxline; __putwchar_xpg5; __putwc_xpg5; - _pwrite; - _qeconvert; - _qecvt; - _qfconvert; - _qfcvt; - _qgconvert; - _qgcvt; - _quadruple_to_decimal; - _rand_r; rctlctl; - _rctlctl; rctllist; - _rctllist; - _readdir_r; _realbufend; - _realpath; __regcomp_C; __regcomp_std; __regerror_std; @@ -2041,76 +1570,24 @@ SUNWprivate_1.1 { _resume; _resume_ret; _rpcsys; - _rwlock_init = NODYNSORT; - _rw_rdlock = NODYNSORT; - _rw_tryrdlock = NODYNSORT; - _rw_trywrlock = NODYNSORT; - _rw_unlock = NODYNSORT; - _rw_wrlock = NODYNSORT; _sbrk_grow_aligned; - _schedctl_exit; - _schedctl_init; - _schedctl_lookup = NODYNSORT; scrwidth; - _seconvert; - _seed48; - _select; - _sema_init; - _sema_post; - _sema_reltimedwait; - _sema_timedwait; - _sema_trywait; - _sema_wait; - _sem_close; semctl64; _semctl64; - _sem_destroy; - _sem_getvalue; - _sem_init; - _sem_open; - _sem_post; - _sem_reltimedwait_np; - _sem_timedwait; - _sem_trywait; - _sem_unlink; - _sem_wait; set_setcontext_enforcement; set_l10n_alternate_root; _setbufend; - _setegid; - _setenv; __set_errno; - _seteuid; - _setgrent; - _setlogmask; - _setpwent; setprojrctl; - _setprojrctl; _setregid; _setreuid; setsigacthandler; - _setspent; - _settimeofday; - _setutent; - _setutxent; - _sfconvert; - _sgconvert; shmctl64; _shmctl64; - _sig2str; sigflag; - _sigflag; - _sigfpe; - _siginterrupt; _signal; _sigoff; _sigon; - _sigqueue; - _sigstack; - _sigtimedwait; - _sigwait; - _sigwaitinfo; - _single_to_decimal; _so_accept; _so_bind; _sockconfig; @@ -2129,106 +1606,57 @@ SUNWprivate_1.1 { _so_shutdown; _so_socket; _so_socketpair; - _srand48; - _ssignal; - _statfs; str2group; str2passwd; - _str2sig; str2spwd; __strcoll_C; __strcoll_sb; __strcoll_std; - _strerror; - _strerror_r; __strfmon_std; __strftime_std; - _string_to_decimal; __strptime_dontzero; __strptime_std; - _strsignal; - _strtok_r; - _strtoll; - _strtoull; __strxfrm_C; __strxfrm_sb; __strxfrm_std; stty; - _stty; - _swapctl; syscall; _sysconfig; - _sysfs; __systemcall; - _thr_continue; thr_continue_allmutators; _thr_continue_allmutators; thr_continue_mutator; _thr_continue_mutator; - _thr_create; - _thr_detach; - _thr_exit = NODYNSORT; - _thr_getconcurrency; - _thr_get_inf_read; - _thr_get_nan_read; - _thr_getprio; - _thr_getspecific; thr_getstate; _thr_getstate; - _thr_join; - _thr_keycreate = NODYNSORT; - _thr_keycreate_once = NODYNSORT; - _thr_key_delete; - _thr_kill = NODYNSORT; - _thr_main; - _thr_min_stack = NODYNSORT; thr_mutators_barrier; _thr_mutators_barrier; thr_probe_setup; _thr_schedctl; - _thr_self = NODYNSORT; - _thr_setconcurrency; thr_setmutator; _thr_setmutator; - _thr_setprio = NODYNSORT; - _thr_setspecific = NODYNSORT; thr_setstate; _thr_setstate; thr_sighndlrinfo; _thr_sighndlrinfo; - _thr_sigsetmask; _thr_slot_offset; - _thr_stksegment; - _thr_suspend; thr_suspend_allmutators; _thr_suspend_allmutators; thr_suspend_mutator; _thr_suspend_mutator; thr_wait_mutator; _thr_wait_mutator; - _thr_yield; __time_init; - _timer_create; - _timer_delete; - _timer_getoverrun; - _timer_gettime; - _timer_settime; __tls_get_addr; - _tmpnam; - _tmpnam_r; __towctrans_bc; __towctrans_std; __towlower_bc; __towlower_std; __towupper_bc; __towupper_std; - _truncate; _trwctype; __trwctype_std; _ttyname_dev; - _ttyname_r; - _ttyslot; - _uadmin; _ucred_alloc; ucred_getamask; _ucred_getamask; @@ -2238,43 +1666,19 @@ SUNWprivate_1.1 { _ucred_getatid; ucred_getauid; _ucred_getauid; - _ulckpwdf; _ulltostr; _uncached_getgrgid_r; _uncached_getgrnam_r; _uncached_getpwnam_r; _uncached_getpwuid_r; - _ungetc_unlocked; __ungetwc_xpg5; _unordered; - _unsetenv; - _updwtmp; - _updwtmpx; - _usleep; - _ustat; - _utimes; - _utmpname; - _utmpxname; utssys; - _utssys; - _verr; _verrfp; - _verrx; _verrxfp; - _vfork; - _vforkx; - _vhangup; - _vsyslog; - _vwarn; _vwarnfp; - _vwarnx; _vwarnxfp; - _wait3; - _wait4; - _walkcontext; - _warn; _warnfp; - _warnx; _warnxfp; __wcrtomb_dense; __wcrtomb_euc; @@ -2303,7 +1707,6 @@ SUNWprivate_1.1 { __wctob_euc; __wctob_sb; __wctoeucpc_gen; - _wctomb; __wctomb_dense; __wctomb_euc; __wctomb_sb; @@ -2320,7 +1723,6 @@ SUNWprivate_1.1 { _wrtchk; _xflsbuf; _xgetwidth; - _yield; zone_add_datalink; zone_boot; zone_check_datalink; @@ -2336,10 +1738,69 @@ SUNWprivate_1.1 { zone_setattr; zone_shutdown; zone_version; +# The following functions should not be exported from libc, +# but /lib/libm.so.2, some older versions of the Studio +# compiler/debugger components, and some ancient programs +# found in /usr/dist reference them. When we no longer +# care about these old and broken binary objects, these +# symbols should be deleted. + _brk = NODYNSORT; + _cond_broadcast = NODYNSORT; + _cond_init = NODYNSORT; + _cond_signal = NODYNSORT; + _cond_wait = NODYNSORT; + _ecvt = NODYNSORT; + _fcvt = NODYNSORT; + _getc_unlocked = NODYNSORT; + _llseek = NODYNSORT; + _pthread_attr_getdetachstate = NODYNSORT; + _pthread_attr_getinheritsched = NODYNSORT; + _pthread_attr_getschedparam = NODYNSORT; + _pthread_attr_getschedpolicy = NODYNSORT; + _pthread_attr_getscope = NODYNSORT; + _pthread_attr_getstackaddr = NODYNSORT; + _pthread_attr_getstacksize = NODYNSORT; + _pthread_attr_init = NODYNSORT; + _pthread_condattr_getpshared = NODYNSORT; + _pthread_condattr_init = NODYNSORT; + _pthread_cond_init = NODYNSORT; + _pthread_create = NODYNSORT; + _pthread_getschedparam = NODYNSORT; + _pthread_join = NODYNSORT; + _pthread_key_create = NODYNSORT; + _pthread_mutexattr_getprioceiling = NODYNSORT; + _pthread_mutexattr_getprotocol = NODYNSORT; + _pthread_mutexattr_getpshared = NODYNSORT; + _pthread_mutexattr_init = NODYNSORT; + _pthread_mutex_getprioceiling = NODYNSORT; + _pthread_mutex_init = NODYNSORT; + _pthread_sigmask = NODYNSORT; + _rwlock_init = NODYNSORT; + _rw_rdlock = NODYNSORT; + _rw_unlock = NODYNSORT; + _rw_wrlock = NODYNSORT; + _sbrk_unlocked = NODYNSORT; + _select = NODYNSORT; + _sema_init = NODYNSORT; + _sema_post = NODYNSORT; + _sema_trywait = NODYNSORT; + _sema_wait = NODYNSORT; + _sysfs = NODYNSORT; + _thr_create = NODYNSORT; + _thr_exit = NODYNSORT; + _thr_getprio = NODYNSORT; + _thr_getspecific = NODYNSORT; + _thr_join = NODYNSORT; + _thr_keycreate = NODYNSORT; + _thr_kill = NODYNSORT; + _thr_main = NODYNSORT; + _thr_self = NODYNSORT; + _thr_setspecific = NODYNSORT; + _thr_sigsetmask = NODYNSORT; + _thr_stksegment = NODYNSORT; + _ungetc_unlocked = NODYNSORT; local: __imax_lldiv = NODYNSORT; _ti_thr_self = NODYNSORT; - rw_read_is_held = NODYNSORT; - rw_write_is_held = NODYNSORT; *; }; diff --git a/usr/src/lib/libc/port/print/doprnt.c b/usr/src/lib/libc/port/print/doprnt.c index cf6e05da01..ac16e9445b 100644 --- a/usr/src/lib/libc/port/print/doprnt.c +++ b/usr/src/lib/libc/port/print/doprnt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" - /* Copyright (c) 1988 AT&T */ - /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * _doprnt: common code for printf, fprintf, sprintf */ -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "print.h" /* parameters & macros for doprnt */ #include <wchar.h> @@ -315,8 +313,7 @@ put_wide(FILE *iop, unsigned char **bufptr, return (EOF); } else { (void) wmemcpy((wchar_t *)*bufptr, p, n); - *bufptr = (unsigned char *) - ((wchar_t *)*bufptr + n); + *bufptr = (unsigned char *)((wchar_t *)*bufptr + n); return (0); } } else { @@ -377,8 +374,7 @@ pad_wide(FILE *iop, unsigned char **bufptr, return (EOF); } else { (void) wmemset((wchar_t *)*bufptr, ps, n); - *bufptr = (unsigned char *) - ((wchar_t *)*bufptr + n); + *bufptr = (unsigned char *)((wchar_t *)*bufptr + n); return (0); } } else { diff --git a/usr/src/lib/libc/port/print/fprintf.c b/usr/src/lib/libc/port/print/fprintf.c index 4cd86b66b4..ce489a274c 100644 --- a/usr/src/lib/libc/port/print/fprintf.c +++ b/usr/src/lib/libc/port/print/fprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -/* This function should not be defined weak, but there might be */ -/* some program or libraries that may be interposing on this */ -#pragma weak fprintf = _fprintf +/* + * This symbol should not be defined, but there are some + * miserable old compiler libraries that depend on it. + */ +#pragma weak _fprintf = fprintf -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <thread.h> #include <synch.h> diff --git a/usr/src/lib/libc/port/print/printf.c b/usr/src/lib/libc/port/print/printf.c index 206a157708..bc3c7b1c1c 100644 --- a/usr/src/lib/libc/port/print/printf.c +++ b/usr/src/lib/libc/port/print/printf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdarg.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/print/snprintf.c b/usr/src/lib/libc/port/print/snprintf.c index 78348f106e..4eb40028d7 100644 --- a/usr/src/lib/libc/port/print/snprintf.c +++ b/usr/src/lib/libc/port/print/snprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,7 +29,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdarg.h> #include <values.h> diff --git a/usr/src/lib/libc/port/print/sprintf.c b/usr/src/lib/libc/port/print/sprintf.c index 102079f3c2..b9bf02a6b9 100644 --- a/usr/src/lib/libc/port/print/sprintf.c +++ b/usr/src/lib/libc/port/print/sprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdarg.h> #include <values.h> diff --git a/usr/src/lib/libc/port/print/vfprintf.c b/usr/src/lib/libc/port/print/vfprintf.c index 91dccacd16..ee17738bdb 100644 --- a/usr/src/lib/libc/port/print/vfprintf.c +++ b/usr/src/lib/libc/port/print/vfprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <thread.h> #include <mtlib.h> #include <synch.h> diff --git a/usr/src/lib/libc/port/print/vprintf.c b/usr/src/lib/libc/port/print/vprintf.c index 91289e7e8d..2db4471179 100644 --- a/usr/src/lib/libc/port/print/vprintf.c +++ b/usr/src/lib/libc/port/print/vprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdarg.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/print/vsnprintf.c b/usr/src/lib/libc/port/print/vsnprintf.c index 7d7df9c765..fbca2eedd3 100644 --- a/usr/src/lib/libc/port/print/vsnprintf.c +++ b/usr/src/lib/libc/port/print/vsnprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,7 +29,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdarg.h> #include <values.h> diff --git a/usr/src/lib/libc/port/print/vsprintf.c b/usr/src/lib/libc/port/print/vsprintf.c index da7f5216a0..d058e5c55f 100644 --- a/usr/src/lib/libc/port/print/vsprintf.c +++ b/usr/src/lib/libc/port/print/vsprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <stdarg.h> #include <values.h> diff --git a/usr/src/lib/libc/port/print/vwprintf.c b/usr/src/lib/libc/port/print/vwprintf.c index 0e149f628d..ae64a62688 100644 --- a/usr/src/lib/libc/port/print/vwprintf.c +++ b/usr/src/lib/libc/port/print/vwprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <mtlib.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/print/wprintf.c b/usr/src/lib/libc/port/print/wprintf.c index c23c59c1e4..4cdfe715fa 100644 --- a/usr/src/lib/libc/port/print/wprintf.c +++ b/usr/src/lib/libc/port/print/wprintf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <mtlib.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/regex/glob.c b/usr/src/lib/libc/port/regex/glob.c index 24367d797d..c557b6f44d 100644 --- a/usr/src/lib/libc/port/regex/glob.c +++ b/usr/src/lib/libc/port/regex/glob.c @@ -20,12 +20,10 @@ */ /* - * Copyright 2006 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" - /* * This code is MKS code ported to Solaris originally with minimum * modifications so that upgrades from MKS would readily integrate. @@ -45,10 +43,12 @@ * Written by Eric Gisin. */ -#pragma weak glob = _glob -#pragma weak globfree = _globfree +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _glob = glob +#pragma weak _globfree = globfree -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <unistd.h> #include <limits.h> @@ -136,7 +136,7 @@ glob(const char *pattern, int flags, i = gp->gl_pathc - ipathc; if (i >= 1 && !(flags & GLOB_NOSORT)) { qsort((char *)(gp->gl_pathp+ipathc), i, sizeof (char *), - pstrcmp); + pstrcmp); } if (i == 0) { if (flags & GLOB_NOCHECK) @@ -232,7 +232,7 @@ globit(size_t dend, const char *sp, glob_t *gp, int flags, /* expand path to max. expansion */ n = dp - *path; *path = realloc(*path, - strlen(*path) + NAME_MAX + strlen(sp) + 1); + strlen(*path) + NAME_MAX + strlen(sp) + 1); if (*path == NULL) { (void) closedir(dirp); free(pat); @@ -290,7 +290,7 @@ append(glob_t *gp, const char *str) if ((gp->gl_pathc + gp->gl_offs) >= gp->gl_pathn) { gp->gl_pathn *= 2; gp->gl_pathv = (char **)realloc((void *)gp->gl_pathv, - gp->gl_pathn * sizeof (char *)); + gp->gl_pathn * sizeof (char *)); if (gp->gl_pathv == NULLCPP) return (GLOB_NOSPACE); gp->gl_pathp = gp->gl_pathv + gp->gl_offs; diff --git a/usr/src/lib/libc/port/regex/regcmp.c b/usr/src/lib/libc/port/regex/regcmp.c index 4533c207df..5463330cd2 100644 --- a/usr/src/lib/libc/port/regex/regcmp.c +++ b/usr/src/lib/libc/port/regex/regcmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -37,9 +37,9 @@ * */ -#pragma weak regcmp = _regcmp +#pragma weak _regcmp = regcmp -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <limits.h> #include <stdarg.h> @@ -112,7 +112,7 @@ int __i_size; int * ___i_size(void) { - if (_thr_main()) + if (thr_main()) return (&__i_size); return ((int *)tsdalloc(_T_REGCMP_ISIZE, sizeof (int), NULL)); } diff --git a/usr/src/lib/libc/port/regex/regex.c b/usr/src/lib/libc/port/regex/regex.c index 369e2b813f..769761daef 100644 --- a/usr/src/lib/libc/port/regex/regex.c +++ b/usr/src/lib/libc/port/regex/regex.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -38,12 +37,11 @@ * */ -#pragma weak regex = _regex +#pragma weak _regex = regex +#include "lint.h" /* CONSTANTS SHARED WITH regcmp() */ #include "regex.h" - -#include "synonyms.h" #include "mtlib.h" #include <limits.h> #include <stdarg.h> @@ -161,7 +159,7 @@ char *__loc1; char ** ____loc1(void) { - if (_thr_main()) + if (thr_main()) return (&__loc1); return ((char **)tsdalloc(_T_REGEX_LOC1, sizeof (char *), NULL)); } @@ -171,8 +169,7 @@ ____loc1(void) /* DEFINITION OF regex() */ extern char * -_regex(const char *regexp, - const char *stringp, ...) +regex(const char *regexp, const char *stringp, ...) { va_list arg_listp; int char_size; diff --git a/usr/src/lib/libc/port/regex/wordexp.c b/usr/src/lib/libc/port/regex/wordexp.c index 10953174a2..d324b9fcb1 100644 --- a/usr/src/lib/libc/port/regex/wordexp.c +++ b/usr/src/lib/libc/port/regex/wordexp.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This code is MKS code ported to Solaris originally with minimum * modifications so that upgrades from MKS would readily integrate. @@ -45,15 +43,17 @@ * */ -#pragma weak wordexp = _wordexp -#pragma weak wordfree = _wordfree +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _wordexp = wordexp +#pragma weak _wordfree = wordfree /* Safeguard against mistakes in the Makefiles */ #ifndef WORDEXP_KSH93 #error "WORDEXP_KSH93 not set. Please check the Makefile flags." #endif -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <unistd.h> #include <limits.h> diff --git a/usr/src/lib/libc/port/rt/clock_timer.c b/usr/src/lib/libc/port/rt/clock_timer.c index 8dfb35be91..2fbcc1a831 100644 --- a/usr/src/lib/libc/port/rt/clock_timer.c +++ b/usr/src/lib/libc/port/rt/clock_timer.c @@ -20,22 +20,13 @@ */ /* - * Copyright 2006 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" -#pragma weak clock_getres = _clock_getres -#pragma weak clock_gettime = _clock_gettime -#pragma weak clock_settime = _clock_settime -#pragma weak timer_create = _timer_create -#pragma weak timer_delete = _timer_delete -#pragma weak timer_getoverrun = _timer_getoverrun -#pragma weak timer_gettime = _timer_gettime -#pragma weak timer_settime = _timer_settime - -#include "synonyms.h" +#include "lint.h" #include <time.h> #include <sys/types.h> #include <stdlib.h> @@ -72,25 +63,25 @@ timer_init(void) } int -_clock_getres(clockid_t clock_id, timespec_t *res) +clock_getres(clockid_t clock_id, timespec_t *res) { return (__clock_getres(clock_id, res)); } int -_clock_gettime(clockid_t clock_id, timespec_t *tp) +clock_gettime(clockid_t clock_id, timespec_t *tp) { return (__clock_gettime(clock_id, tp)); } int -_clock_settime(clockid_t clock_id, const timespec_t *tp) +clock_settime(clockid_t clock_id, const timespec_t *tp) { return (__clock_settime(clock_id, tp)); } int -_timer_create(clockid_t clock_id, struct sigevent *sigevp, timer_t *timerid) +timer_create(clockid_t clock_id, struct sigevent *sigevp, timer_t *timerid) { struct sigevent sigevent; port_notify_t port_notify; @@ -132,7 +123,7 @@ _timer_create(clockid_t clock_id, struct sigevent *sigevp, timer_t *timerid) } int -_timer_delete(timer_t timerid) +timer_delete(timer_t timerid) { int rc; @@ -143,19 +134,19 @@ _timer_delete(timer_t timerid) } int -_timer_getoverrun(timer_t timerid) +timer_getoverrun(timer_t timerid) { return (__timer_getoverrun(timerid) + sigev_timer_getoverrun(timerid)); } int -_timer_gettime(timer_t timerid, itimerspec_t *value) +timer_gettime(timer_t timerid, itimerspec_t *value) { return (__timer_gettime(timerid, value)); } int -_timer_settime(timer_t timerid, int flags, const itimerspec_t *value, +timer_settime(timer_t timerid, int flags, const itimerspec_t *value, itimerspec_t *ovalue) { return (__timer_settime(timerid, flags, value, ovalue)); diff --git a/usr/src/lib/libc/port/rt/fallocate.c b/usr/src/lib/libc/port/rt/fallocate.c index 17b9088052..1f7a627fd9 100644 --- a/usr/src/lib/libc/port/rt/fallocate.c +++ b/usr/src/lib/libc/port/rt/fallocate.c @@ -20,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <errno.h> #include <fcntl.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/port/rt/mqueue.c b/usr/src/lib/libc/port/rt/mqueue.c index 1b1ea65deb..1f9d6bc770 100644 --- a/usr/src/lib/libc/port/rt/mqueue.c +++ b/usr/src/lib/libc/port/rt/mqueue.c @@ -26,20 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak mq_open = _mq_open -#pragma weak mq_close = _mq_close -#pragma weak mq_unlink = _mq_unlink -#pragma weak mq_send = _mq_send -#pragma weak mq_timedsend = _mq_timedsend -#pragma weak mq_reltimedsend_np = _mq_reltimedsend_np -#pragma weak mq_receive = _mq_receive -#pragma weak mq_timedreceive = _mq_timedreceive -#pragma weak mq_reltimedreceive_np = _mq_reltimedreceive_np -#pragma weak mq_notify = _mq_notify -#pragma weak mq_setattr = _mq_setattr -#pragma weak mq_getattr = _mq_getattr - -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #define _KMEMUSER #include <sys/param.h> /* _MQ_OPEN_MAX, _MQ_PRIO_MAX, _SEM_VALUE_MAX */ @@ -349,7 +336,7 @@ mq_putmsg(mqhdr_t *mqhp, const char *msgp, ssize_t len, uint_t prio) } mqd_t -_mq_open(const char *path, int oflag, /* mode_t mode, mq_attr *attr */ ...) +mq_open(const char *path, int oflag, /* mode_t mode, mq_attr *attr */ ...) { va_list ap; mode_t mode; @@ -568,7 +555,7 @@ mq_close_cleanup(mqdes_t *mqdp) } int -_mq_close(mqd_t mqdes) +mq_close(mqd_t mqdes) { mqdes_t *mqdp = (mqdes_t *)mqdes; mqhdr_t *mqhp; @@ -601,7 +588,7 @@ _mq_close(mqd_t mqdes) } int -_mq_unlink(const char *path) +mq_unlink(const char *path) { int err; @@ -731,14 +718,14 @@ __mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, } int -_mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, uint_t msg_prio) +mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, uint_t msg_prio) { return (__mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, NULL, ABS_TIME)); } int -_mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, +mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, uint_t msg_prio, const timespec_t *abs_timeout) { return (__mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, @@ -746,7 +733,7 @@ _mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, } int -_mq_reltimedsend_np(mqd_t mqdes, const char *msg_ptr, size_t msg_len, +mq_reltimedsend_np(mqd_t mqdes, const char *msg_ptr, size_t msg_len, uint_t msg_prio, const timespec_t *rel_timeout) { return (__mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, @@ -843,14 +830,14 @@ __mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, } ssize_t -_mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, uint_t *msg_prio) +mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, uint_t *msg_prio) { return (__mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, NULL, ABS_TIME)); } ssize_t -_mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, +mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, uint_t *msg_prio, const timespec_t *abs_timeout) { return (__mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, @@ -858,7 +845,7 @@ _mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, } ssize_t -_mq_reltimedreceive_np(mqd_t mqdes, char *msg_ptr, size_t msg_len, +mq_reltimedreceive_np(mqd_t mqdes, char *msg_ptr, size_t msg_len, uint_t *msg_prio, const timespec_t *rel_timeout) { return (__mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, @@ -866,7 +853,7 @@ _mq_reltimedreceive_np(mqd_t mqdes, char *msg_ptr, size_t msg_len, } /* - * Only used below, in _mq_notify(). + * Only used below, in mq_notify(). * We already have a spawner thread. * Verify that the attributes match; cancel it if necessary. */ @@ -874,7 +861,7 @@ static int cancel_if_necessary(thread_communication_data_t *tcdp, const struct sigevent *sigevp) { - int do_cancel = !_pthread_attr_equal(tcdp->tcd_attrp, + int do_cancel = !pthread_attr_equal(tcdp->tcd_attrp, sigevp->sigev_notify_attributes); if (do_cancel) { @@ -898,7 +885,7 @@ cancel_if_necessary(thread_communication_data_t *tcdp, } int -_mq_notify(mqd_t mqdes, const struct sigevent *sigevp) +mq_notify(mqd_t mqdes, const struct sigevent *sigevp) { mqdes_t *mqdp = (mqdes_t *)mqdes; mqhdr_t *mqhp; @@ -1030,7 +1017,7 @@ bad: } int -_mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat) +mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat) { mqdes_t *mqdp = (mqdes_t *)mqdes; mqhdr_t *mqhp; @@ -1062,7 +1049,7 @@ _mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat) } int -_mq_getattr(mqd_t mqdes, struct mq_attr *mqstat) +mq_getattr(mqd_t mqdes, struct mq_attr *mqstat) { mqdes_t *mqdp = (mqdes_t *)mqdes; mqhdr_t *mqhp; diff --git a/usr/src/lib/libc/port/rt/pos4obj.c b/usr/src/lib/libc/port/rt/pos4obj.c index 3dc20cb761..29b8565eae 100644 --- a/usr/src/lib/libc/port/rt/pos4obj.c +++ b/usr/src/lib/libc/port/rt/pos4obj.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/rt/sched.c b/usr/src/lib/libc/port/rt/sched.c index df1be0e7ad..31da819017 100644 --- a/usr/src/lib/libc/port/rt/sched.c +++ b/usr/src/lib/libc/port/rt/sched.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <sched.h> #include <sys/tspriocntl.h> @@ -128,7 +128,7 @@ get_info_by_policy(int policy) * dynamic loading of scheduling classes. */ if (base) { - _membar_producer(); + membar_producer(); pccp->pcc_state = -1; } errno = EINVAL; @@ -138,7 +138,7 @@ get_info_by_policy(int policy) pccp->pcc_policy = policy; } else if (policy != SCHED_SYS && priocntl(0, 0, PC_GETCID, &pccp->pcc_info) == -1) { - _membar_producer(); + membar_producer(); pccp->pcc_state = -1; errno = EINVAL; lmutex_unlock(&class_lock); @@ -170,7 +170,7 @@ get_info_by_policy(int policy) break; } - _membar_producer(); + membar_producer(); pccp->pcc_state = 1; lmutex_unlock(&class_lock); return (pccp); @@ -577,7 +577,7 @@ update_sched(ulwp_t *self) if (self->ul_policy < 0) { self->ul_cid = 0; self->ul_pri = 0; - _membar_producer(); + membar_producer(); self->ul_policy = SCHED_OTHER; } exit_critical(self); @@ -596,7 +596,7 @@ update_sched(ulwp_t *self) if (pccp == NULL) { /* can't happen? */ self->ul_cid = scp->sc_cid; self->ul_pri = scp->sc_cpri; - _membar_producer(); + membar_producer(); self->ul_policy = SCHED_OTHER; exit_critical(self); return; @@ -629,7 +629,7 @@ update_sched(ulwp_t *self) self->ul_cid = pcparm.pc_cid; self->ul_pri = priority; - _membar_producer(); + membar_producer(); self->ul_policy = policy; exit_critical(self); diff --git a/usr/src/lib/libc/port/rt/sem.c b/usr/src/lib/libc/port/rt/sem.c index af3bdcc06a..f378c93d27 100644 --- a/usr/src/lib/libc/port/rt/sem.c +++ b/usr/src/lib/libc/port/rt/sem.c @@ -20,25 +20,13 @@ */ /* - * Copyright 2006 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" -#pragma weak sem_open = _sem_open -#pragma weak sem_close = _sem_close -#pragma weak sem_unlink = _sem_unlink -#pragma weak sem_init = _sem_init -#pragma weak sem_destroy = _sem_destroy -#pragma weak sem_wait = _sem_wait -#pragma weak sem_timedwait = _sem_timedwait -#pragma weak sem_reltimedwait_np = _sem_reltimedwait_np -#pragma weak sem_trywait = _sem_trywait -#pragma weak sem_post = _sem_post -#pragma weak sem_getvalue = _sem_getvalue - -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <semaphore.h> @@ -66,7 +54,7 @@ static semaddr_t *semheadp = NULL; static mutex_t semlock = DEFAULTMUTEX; sem_t * -_sem_open(const char *path, int oflag, /* mode_t mode, int value */ ...) +sem_open(const char *path, int oflag, /* mode_t mode, int value */ ...) { va_list ap; mode_t crmode = 0; @@ -106,7 +94,7 @@ _sem_open(const char *path, int oflag, /* mode_t mode, int value */ ...) errno = 0; if ((fd = __pos4obj_open(path, SEM_DATA_TYPE, - oflag, crmode, &cr_flag)) < 0) + oflag, crmode, &cr_flag)) < 0) goto out; if (cr_flag) @@ -150,7 +138,7 @@ _sem_open(const char *path, int oflag, /* mode_t mode, int value */ ...) /* LINTED */ sem = (sem_t *)mmap64(NULL, sizeof (sem_t), PROT_READ|PROT_WRITE, - MAP_SHARED, fd, (off64_t)0); + MAP_SHARED, fd, (off64_t)0); (void) __close_nc(fd); cr_flag &= ~DFILE_OPEN; if (sem == MAP_FAILED) @@ -194,7 +182,7 @@ out: } int -_sem_close(sem_t *sem) +sem_close(sem_t *sem) { semaddr_t **next; semaddr_t *freeit; @@ -215,7 +203,7 @@ _sem_close(sem_t *sem) } int -_sem_unlink(const char *path) +sem_unlink(const char *path) { int error; int oerrno; @@ -255,7 +243,7 @@ sem_invalid(sem_t *sem) } int -_sem_init(sem_t *sem, int pshared, uint_t value) +sem_init(sem_t *sem, int pshared, uint_t value) { int error; @@ -268,7 +256,7 @@ _sem_init(sem_t *sem, int pshared, uint_t value) } int -_sem_destroy(sem_t *sem) +sem_destroy(sem_t *sem) { int error; @@ -282,7 +270,7 @@ _sem_destroy(sem_t *sem) } int -_sem_post(sem_t *sem) +sem_post(sem_t *sem) { int error; @@ -296,7 +284,7 @@ _sem_post(sem_t *sem) } int -_sem_wait(sem_t *sem) +sem_wait(sem_t *sem) { int error; @@ -310,7 +298,7 @@ _sem_wait(sem_t *sem) } int -_sem_timedwait(sem_t *sem, const timespec_t *abstime) +sem_timedwait(sem_t *sem, const timespec_t *abstime) { int error; @@ -326,7 +314,7 @@ _sem_timedwait(sem_t *sem, const timespec_t *abstime) } int -_sem_reltimedwait_np(sem_t *sem, const timespec_t *reltime) +sem_reltimedwait_np(sem_t *sem, const timespec_t *reltime) { int error; @@ -342,7 +330,7 @@ _sem_reltimedwait_np(sem_t *sem, const timespec_t *reltime) } int -_sem_trywait(sem_t *sem) +sem_trywait(sem_t *sem) { int error; @@ -358,7 +346,7 @@ _sem_trywait(sem_t *sem) } int -_sem_getvalue(sem_t *sem, int *sval) +sem_getvalue(sem_t *sem, int *sval) { if (sem_invalid(sem)) return (-1); diff --git a/usr/src/lib/libc/port/rt/shm.c b/usr/src/lib/libc/port/rt/shm.c index 53c59d9424..87f2cfae44 100644 --- a/usr/src/lib/libc/port/rt/shm.c +++ b/usr/src/lib/libc/port/rt/shm.c @@ -20,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> #include <fcntl.h> diff --git a/usr/src/lib/libc/port/rt/sigev_thread.c b/usr/src/lib/libc/port/rt/sigev_thread.c index e048fc5196..05f3785c25 100644 --- a/usr/src/lib/libc/port/rt/sigev_thread.c +++ b/usr/src/lib/libc/port/rt/sigev_thread.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <sys/types.h> #include <pthread.h> @@ -345,7 +345,7 @@ aio_spawner(void *arg) if (function == NULL) error = EINVAL; - else if (_pthread_attr_equal(attrp, tcdp->tcd_attrp)) + else if (pthread_attr_equal(attrp, tcdp->tcd_attrp)) error = sigev_add_work(tcdp, function, argument); else { /* @@ -358,12 +358,12 @@ aio_spawner(void *arg) if ((stdp = lmalloc(sizeof (*stdp))) == NULL) error = ENOMEM; else - error = _pthread_attr_clone(&local_attr, attrp); + error = pthread_attr_clone(&local_attr, attrp); if (error == 0) { (void) pthread_attr_setdetachstate( &local_attr, PTHREAD_CREATE_DETACHED); - (void) _pthread_attr_setdaemonstate_np( + (void) pthread_attr_setdaemonstate_np( &local_attr, PTHREAD_CREATE_DAEMON_NP); stdp->std_func = function; stdp->std_arg = argument; @@ -472,7 +472,7 @@ setup_sigev_handler(const struct sigevent *sigevp, subsystem_t caller) * pthread_attr_t. */ tcdp->tcd_attrp = &tcdp->tcd_user_attr; - error = _pthread_attr_clone(tcdp->tcd_attrp, + error = pthread_attr_clone(tcdp->tcd_attrp, sigevp->sigev_notify_attributes); if (error) { tcdp->tcd_attrp = NULL; diff --git a/usr/src/lib/libc/port/rt/sigev_thread.h b/usr/src/lib/libc/port/rt/sigev_thread.h index 943cb8ab23..0a0e6b0010 100644 --- a/usr/src/lib/libc/port/rt/sigev_thread.h +++ b/usr/src/lib/libc/port/rt/sigev_thread.h @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -101,8 +101,8 @@ extern void del_sigev_mq(thread_communication_data_t *); extern void *aio_spawner(void *); /* Private interfaces elsewhere in libc */ -extern int _pthread_attr_clone(pthread_attr_t *, const pthread_attr_t *); -extern int _pthread_attr_equal(const pthread_attr_t *, const pthread_attr_t *); +extern int pthread_attr_clone(pthread_attr_t *, const pthread_attr_t *); +extern int pthread_attr_equal(const pthread_attr_t *, const pthread_attr_t *); extern int _port_dispatch(int, int, int, int, uintptr_t, void *); extern thread_communication_data_t *sigev_aio_tcd; diff --git a/usr/src/lib/libc/port/stdio/__extensions.c b/usr/src/lib/libc/port/stdio/__extensions.c index bd680ce136..e5620dd446 100644 --- a/usr/src/lib/libc/port/stdio/__extensions.c +++ b/usr/src/lib/libc/port/stdio/__extensions.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <sys/types.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/_endopen.c b/usr/src/lib/libc/port/stdio/_endopen.c index e58a779cc5..8e9ef792ac 100644 --- a/usr/src/lib/libc/port/stdio/_endopen.c +++ b/usr/src/lib/libc/port/stdio/_endopen.c @@ -18,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * This routine is a special case, in that it is aware of @@ -35,16 +35,6 @@ * in the small compilation environment. */ -#include <sys/feature_tests.h> - -#define close _close -#define lseek _lseek -#define open _open -#if !defined(_LP64) -#define lseek64 _lseek64 -#define open64 _open64 -#endif - #include "lint.h" #include "file64.h" #include <mtlib.h> diff --git a/usr/src/lib/libc/port/stdio/_filbuf.c b/usr/src/lib/libc/port/stdio/_filbuf.c index 4b271cef2d..73150feb3a 100644 --- a/usr/src/lib/libc/port/stdio/_filbuf.c +++ b/usr/src/lib/libc/port/stdio/_filbuf.c @@ -30,9 +30,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak _filbuf = __filbuf +#pragma weak __filbuf = _filbuf -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <stdio.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/stdio/_findbuf.c b/usr/src/lib/libc/port/stdio/_findbuf.c index cbb323c3eb..d0c1949e98 100644 --- a/usr/src/lib/libc/port/stdio/_findbuf.c +++ b/usr/src/lib/libc/port/stdio/_findbuf.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,7 +32,7 @@ #define _LARGEFILE64_SOURCE 1 -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <stdlib.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/_flsbuf.c b/usr/src/lib/libc/port/stdio/_flsbuf.c index bcbc7f1a5a..234d9fd2c4 100644 --- a/usr/src/lib/libc/port/stdio/_flsbuf.c +++ b/usr/src/lib/libc/port/stdio/_flsbuf.c @@ -29,8 +29,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak _flsbuf = __flsbuf -#include "synonyms.h" +#pragma weak __flsbuf = _flsbuf + +#include "lint.h" #include "file64.h" #include <mtlib.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/_wrtchk.c b/usr/src/lib/libc/port/stdio/_wrtchk.c index 40bce18a96..767e81ac39 100644 --- a/usr/src/lib/libc/port/stdio/_wrtchk.c +++ b/usr/src/lib/libc/port/stdio/_wrtchk.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <stdio.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/stdio/clearerr.c b/usr/src/lib/libc/port/stdio/clearerr.c index 57ded209c0..9e3d95e291 100644 --- a/usr/src/lib/libc/port/stdio/clearerr.c +++ b/usr/src/lib/libc/port/stdio/clearerr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak clearerr_unlocked = _clearerr_unlocked - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <mtlib.h> #include <stdio.h> @@ -52,9 +49,3 @@ clearerr(FILE *iop) iop->_flag &= ~(_IOERR | _IOEOF); FUNLOCKFILE(lk); } - -void -_clearerr_unlocked(FILE *iop) -{ - iop->_flag &= ~(_IOERR | _IOEOF); -} diff --git a/usr/src/lib/libc/port/stdio/ctermid.c b/usr/src/lib/libc/port/stdio/ctermid.c index ea49f58b8a..0aba1d8d12 100644 --- a/usr/src/lib/libc/port/stdio/ctermid.c +++ b/usr/src/lib/libc/port/stdio/ctermid.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak ctermid = _ctermid +#pragma weak _ctermid = ctermid -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <stdio.h> #include <string.h> diff --git a/usr/src/lib/libc/port/stdio/ctermid_r.c b/usr/src/lib/libc/port/stdio/ctermid_r.c index 7bf667c0fe..a6fed17995 100644 --- a/usr/src/lib/libc/port/stdio/ctermid_r.c +++ b/usr/src/lib/libc/port/stdio/ctermid_r.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak ctermid_r = _ctermid_r - -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <stdio.h> #include <string.h> @@ -44,7 +41,7 @@ */ char * -_ctermid_r(char *s) +ctermid_r(char *s) { return (s ? strcpy(s, "/dev/tty") : NULL); } diff --git a/usr/src/lib/libc/port/stdio/cuserid.c b/usr/src/lib/libc/port/stdio/cuserid.c index ec46291230..9d0c784e48 100644 --- a/usr/src/lib/libc/port/stdio/cuserid.c +++ b/usr/src/lib/libc/port/stdio/cuserid.c @@ -24,14 +24,14 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak cuserid = _cuserid +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _cuserid = cuserid -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <pwd.h> #include <string.h> diff --git a/usr/src/lib/libc/port/stdio/data.c b/usr/src/lib/libc/port/stdio/data.c index a4da2c23e3..42293e2a75 100644 --- a/usr/src/lib/libc/port/stdio/data.c +++ b/usr/src/lib/libc/port/stdio/data.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak _iob = __iob +#pragma weak __iob = _iob -#include "synonyms.h" +#include "lint.h" #include "mbstatet.h" #include "mtlib.h" #include "file64.h" diff --git a/usr/src/lib/libc/port/stdio/doscan.c b/usr/src/lib/libc/port/stdio/doscan.c index 961afe65c8..1f473a608d 100644 --- a/usr/src/lib/libc/port/stdio/doscan.c +++ b/usr/src/lib/libc/port/stdio/doscan.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include "mtlib.h" #include "file64.h" @@ -738,7 +737,7 @@ number(int *chcount, int *flag_eof, int stow, int type, int len, int size, if ((type != 'i' && type != 'x') || (len <= 1)) break; if (((inchar = locgetc((*chcount))) == 'x') || - (inchar == 'X')) { + (inchar == 'X')) { lookahead = readchar(iop, chcount); if (isxdigit(lookahead)) { base = 16; @@ -765,12 +764,12 @@ number(int *chcount, int *flag_eof, int stow, int type, int len, int size, } for (; --len >= 0; *np++ = (char)c, c = locgetc((*chcount))) { if (np > numbuf + 62) { - errno = ERANGE; - return (0); + errno = ERANGE; + return (0); } if (isdigit(c) || base == 16 && isxdigit(c)) { int digit = c - (isdigit(c) ? '0' : - isupper(c) ? 'A' - 10 : 'a' - 10); + isupper(c) ? 'A' - 10 : 'a' - 10); if (digit >= base) break; if (stow) @@ -804,7 +803,7 @@ number(int *chcount, int *flag_eof, int stow, int type, int len, int size, } } if (locungetc((*chcount), c) == EOF) - *flag_eof = 1; + *flag_eof = 1; return (digitseen); /* successful match if non-zero */ } @@ -842,11 +841,11 @@ string(int *chcount, int *flag_eof, int stow, int type, int len, char *tab, len = 1; #ifdef _WIDE while ((ch = locgetc((*chcount))) != EOF && - !(((type == 's') || (type == 'S')) && isspace(ch))) { + !(((type == 's') || (type == 'S')) && isspace(ch))) { #else /* _WIDE */ while ((ch = locgetc((*chcount))) != EOF && - !(((type == 's') || (type == 'S')) && - isspace(ch) || type == '[' && tab[ch])) { + !(((type == 's') || (type == 'S')) && + isspace(ch) || type == '[' && tab[ch])) { #endif /* _WIDE */ if (stow) *ptr = (char)ch; @@ -973,7 +972,7 @@ wstring(int *chcount, int *flag_eof, int stow, int type, if ((type == 'c') && len == MAXINT) len = 1; while (((wch = _wd_getwc(chcount, iop)) != WEOF) && - !(type == 's' && iswspace(wch))) { + !(type == 's' && iswspace(wch))) { if (stow) *ptr = wch; ptr++; @@ -1007,7 +1006,7 @@ wstring(int *chcount, int *flag_eof, int stow, int type, int len, FILE *iop, if ((type == 'c') && len == MAXINT) len = 1; while (((wch = _bi_getwc(iop)) != EOF) && - !(type == 's' && (isascii(wch) ? isspace(wch) : 0))) { + !(type == 's' && (isascii(wch) ? isspace(wch) : 0))) { (*chcount) += _scrwidth((wchar_t)wch); if (stow) *ptr = wch; @@ -1047,7 +1046,7 @@ _wd_getwc(int *chcount, FILE *iop) if (*iop->_ptr == '\0') return (WEOF); len = mbtowc((wchar_t *)&wc, (const char *)iop->_ptr, - MB_CUR_MAX); + MB_CUR_MAX); if (len == -1) return (WEOF); iop->_ptr += len; @@ -1094,7 +1093,7 @@ _watoi(wchar_t *fmt) if ((ch >= 0) && (ch < 256) && isdigit((int)ch)) { n = ch - '0'; while (((ch = *++fmt) >= 0) && (ch < 256) && - isdigit((int)ch)) { + isdigit((int)ch)) { n *= 10; n += ch - '0'; } @@ -1129,7 +1128,7 @@ wbrstring(int *chcount, int *flag_eof, int stow, int type, } str[i] = '\0'; if (fnmatch((const char *)brstr, (const char *)str, - FNM_NOESCAPE)) { + FNM_NOESCAPE)) { break; } else { if (len > 0) { @@ -1188,7 +1187,7 @@ brstring(int *chcount, int *flag_eof, int stow, int type, } str[i] = '\0'; if (fnmatch((const char *)brstr, (const char *)str, - FNM_NOESCAPE)) { + FNM_NOESCAPE)) { break; } else { if (len >= i) { diff --git a/usr/src/lib/libc/port/stdio/fdopen.c b/usr/src/lib/libc/port/stdio/fdopen.c index 4865ec9a39..f07d8b0a88 100644 --- a/usr/src/lib/libc/port/stdio/fdopen.c +++ b/usr/src/lib/libc/port/stdio/fdopen.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -37,9 +37,9 @@ #define _LARGEFILE64_SOURCE 1 -#pragma weak fdopen = _fdopen +#pragma weak _fdopen = fdopen -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include "file64.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/feof.c b/usr/src/lib/libc/port/stdio/feof.c index dab0610326..3d4f3c8e1f 100644 --- a/usr/src/lib/libc/port/stdio/feof.c +++ b/usr/src/lib/libc/port/stdio/feof.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,16 +20,16 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include <mtlib.h> #include "file64.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/ferror.c b/usr/src/lib/libc/port/stdio/ferror.c index 3ee8b6f865..49312b4ce6 100644 --- a/usr/src/lib/libc/port/stdio/ferror.c +++ b/usr/src/lib/libc/port/stdio/ferror.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,16 +20,16 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/fgetc.c b/usr/src/lib/libc/port/stdio/fgetc.c index 36a6851758..4c368459cf 100644 --- a/usr/src/lib/libc/port/stdio/fgetc.c +++ b/usr/src/lib/libc/port/stdio/fgetc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/fgets.c b/usr/src/lib/libc/port/stdio/fgets.c index 972223d4ff..ea19354d81 100644 --- a/usr/src/lib/libc/port/stdio/fgets.c +++ b/usr/src/lib/libc/port/stdio/fgets.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/fileno.c b/usr/src/lib/libc/port/stdio/fileno.c index 643ee4cb01..70f64faa89 100644 --- a/usr/src/lib/libc/port/stdio/fileno.c +++ b/usr/src/lib/libc/port/stdio/fileno.c @@ -20,18 +20,18 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak fileno = _fileno +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _fileno = fileno -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> @@ -41,7 +41,7 @@ #include "stdiom.h" int -_fileno(FILE *iop) +fileno(FILE *iop) { return (GET_FD(iop)); } diff --git a/usr/src/lib/libc/port/stdio/flockf.c b/usr/src/lib/libc/port/stdio/flockf.c index ac9db7ccae..0d31d5649b 100644 --- a/usr/src/lib/libc/port/stdio/flockf.c +++ b/usr/src/lib/libc/port/stdio/flockf.c @@ -29,15 +29,8 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak flockfile = _flockfile -#pragma weak ftrylockfile = _ftrylockfile -#pragma weak funlockfile = _funlockfile - -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" - -#define _iob __iob - #include "file64.h" #include <stdio.h> #include <thread.h> @@ -47,6 +40,8 @@ #include <stdio_ext.h> #include "stdiom.h" +#define _iob __iob + /* * _flockget and _flockrel are only called by the * FLOCKFILE/FUNLOCKFILE macros in mtlib.h. @@ -82,7 +77,7 @@ flockfile(FILE *iop) rmutex_t *rl = IOB_LCK(iop); if (rl != NULL) - mutex_lock(rl); + (void) mutex_lock(rl); } void @@ -91,7 +86,7 @@ funlockfile(FILE *iop) rmutex_t *rl = IOB_LCK(iop); if (rl != NULL) - mutex_unlock(rl); + (void) mutex_unlock(rl); } int diff --git a/usr/src/lib/libc/port/stdio/flush.c b/usr/src/lib/libc/port/stdio/flush.c index 9d87b8c4fd..fb8d058e4c 100644 --- a/usr/src/lib/libc/port/stdio/flush.c +++ b/usr/src/lib/libc/port/stdio/flush.c @@ -24,18 +24,14 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "file64.h" - -#define _iob __iob - #include <sys/types.h> #include <stdlib.h> #include <stdio.h> @@ -50,6 +46,8 @@ #include <errno.h> #include <fcntl.h> +#define _iob __iob + #undef end #define FILE_ARY_SZ 8 /* a nice size for FILE array & end_buffer_ptrs */ @@ -365,14 +363,16 @@ rescan: #ifdef _LP64 fp = hdr->iobp; for (i = 0; i < FILE_ARY_SZ; i++) - mutex_init(&fp[i]._lock, USYNC_THREAD | LOCK_RECURSIVE, NULL); + (void) mutex_init(&fp[i]._lock, + USYNC_THREAD | LOCK_RECURSIVE, NULL); #else xfp = hdr->iobp; fp = &xfp->_iob; for (i = 0; i < FILE_ARY_SZ; i++) { xfp[i].xmagic = XMAGIC(&xfp[i]); - mutex_init(&xfp[i].xlock, USYNC_THREAD | LOCK_RECURSIVE, NULL); + (void) mutex_init(&xfp[i].xlock, + USYNC_THREAD | LOCK_RECURSIVE, NULL); } #endif /* _LP64 */ diff --git a/usr/src/lib/libc/port/stdio/fopen.c b/usr/src/lib/libc/port/stdio/fopen.c index 4881cef27d..eea8093aca 100644 --- a/usr/src/lib/libc/port/stdio/fopen.c +++ b/usr/src/lib/libc/port/stdio/fopen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <sys/types.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/fpos.c b/usr/src/lib/libc/port/stdio/fpos.c index d2395fc801..8fb2b87e74 100644 --- a/usr/src/lib/libc/port/stdio/fpos.c +++ b/usr/src/lib/libc/port/stdio/fpos.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,17 +20,16 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <unistd.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/fputc.c b/usr/src/lib/libc/port/stdio/fputc.c index adb4de9306..d85917d11d 100644 --- a/usr/src/lib/libc/port/stdio/fputc.c +++ b/usr/src/lib/libc/port/stdio/fputc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/fputs.c b/usr/src/lib/libc/port/stdio/fputs.c index e115d4012e..be0f5b4f8f 100644 --- a/usr/src/lib/libc/port/stdio/fputs.c +++ b/usr/src/lib/libc/port/stdio/fputs.c @@ -34,7 +34,7 @@ * Ptr args aren't checked for NULL because the program would be a * catastrophic mess anyway. Better to abort than just to return NULL. */ -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/fread.c b/usr/src/lib/libc/port/stdio/fread.c index 59d0e44bfe..db58e7bde1 100644 --- a/usr/src/lib/libc/port/stdio/fread.c +++ b/usr/src/lib/libc/port/stdio/fread.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/fseek.c b/usr/src/lib/libc/port/stdio/fseek.c index b553424de6..55017a6584 100644 --- a/usr/src/lib/libc/port/stdio/fseek.c +++ b/usr/src/lib/libc/port/stdio/fseek.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Seek for standard library. Coordinates with buffering. */ -#pragma weak fseek = _fseek +#pragma weak _fseek = fseek -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/fseeko.c b/usr/src/lib/libc/port/stdio/fseeko.c index e0cadc5f3f..b47c7a5313 100644 --- a/usr/src/lib/libc/port/stdio/fseeko.c +++ b/usr/src/lib/libc/port/stdio/fseeko.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Seek for standard library. Coordinates with buffering. @@ -37,11 +36,11 @@ #include <sys/feature_tests.h> #if !defined(_LP64) -#pragma weak fseeko64 = _fseeko64 +#pragma weak _fseeko64 = fseeko64 #endif -#pragma weak fseeko = _fseeko +#pragma weak _fseeko = fseeko -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/ftell.c b/usr/src/lib/libc/port/stdio/ftell.c index 831ef96cad..45c0b841d6 100644 --- a/usr/src/lib/libc/port/stdio/ftell.c +++ b/usr/src/lib/libc/port/stdio/ftell.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return file offset. * Coordinates with buffering. */ -#pragma weak ftell = _ftell +#pragma weak _ftell = ftell -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <fcntl.h> @@ -65,7 +64,7 @@ ftell(FILE *iop) else if (iop->_flag & (_IOWRT | _IORW)) { adjust = 0; if (((iop->_flag & (_IOWRT | _IONBF)) == _IOWRT) && - (iop->_base != 0)) + (iop->_base != 0)) adjust = iop->_ptr - iop->_base; else if ((iop->_flag & _IORW) && (iop->_base != 0)) adjust = (ptrdiff_t)-iop->_cnt; diff --git a/usr/src/lib/libc/port/stdio/ftello.c b/usr/src/lib/libc/port/stdio/ftello.c index a7e1dd7400..2eafdf1fef 100644 --- a/usr/src/lib/libc/port/stdio/ftello.c +++ b/usr/src/lib/libc/port/stdio/ftello.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Return file offset. @@ -38,11 +37,11 @@ #include <sys/feature_tests.h> #if !defined(_LP64) -#pragma weak ftello64 = _ftello64 +#pragma weak _ftello64 = ftello64 #endif -#pragma weak ftello = _ftello +#pragma weak _ftello = ftello -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> @@ -73,7 +72,7 @@ ftello64(FILE *iop) else if (iop->_flag & (_IOWRT | _IORW)) { adjust = 0; if (((iop->_flag & (_IOWRT | _IONBF)) == _IOWRT) && - (iop->_base != 0)) + (iop->_base != 0)) adjust = iop->_ptr - iop->_base; } else { errno = EBADF; /* file descriptor refers to no open file */ diff --git a/usr/src/lib/libc/port/stdio/fwrite.c b/usr/src/lib/libc/port/stdio/fwrite.c index 6ab340e26d..db5928f9f4 100644 --- a/usr/src/lib/libc/port/stdio/fwrite.c +++ b/usr/src/lib/libc/port/stdio/fwrite.c @@ -24,13 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/getc.c b/usr/src/lib/libc/port/stdio/getc.c index ea757d6bdc..cfcf53f347 100644 --- a/usr/src/lib/libc/port/stdio/getc.c +++ b/usr/src/lib/libc/port/stdio/getc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getc_unlocked = _getc_unlocked +#pragma weak _getc_unlocked = getc_unlocked -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> @@ -43,8 +42,7 @@ #include "mse.h" #undef getc - -#undef _getc_unlocked +#undef getc_unlocked int getc(FILE *iop) @@ -63,7 +61,7 @@ getc(FILE *iop) int -_getc_unlocked(FILE *iop) +getc_unlocked(FILE *iop) { return ((--iop->_cnt < 0) ? __filbuf(iop) : *iop->_ptr++); } diff --git a/usr/src/lib/libc/port/stdio/getchar.c b/usr/src/lib/libc/port/stdio/getchar.c index cef4de7ba0..31a32f3842 100644 --- a/usr/src/lib/libc/port/stdio/getchar.c +++ b/usr/src/lib/libc/port/stdio/getchar.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * A subroutine version of the macro getchar. */ -#pragma weak getchar_unlocked = _getchar_unlocked - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> @@ -46,8 +43,7 @@ #include "stdiom.h" #undef getchar - -#undef _getchar_unlocked +#undef getchar_unlocked int getchar(void) @@ -61,9 +57,8 @@ getchar(void) * A subroutine version of the macro getchar_unlocked. */ - int -_getchar_unlocked(void) +getchar_unlocked(void) { FILE *iop = stdin; diff --git a/usr/src/lib/libc/port/stdio/getpass.c b/usr/src/lib/libc/port/stdio/getpass.c index b67975b751..f59d9134c6 100644 --- a/usr/src/lib/libc/port/stdio/getpass.c +++ b/usr/src/lib/libc/port/stdio/getpass.c @@ -18,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getpass = _getpass -#pragma weak getpassphrase = _getpassphrase +#pragma weak _getpass = getpass +#pragma weak _getpassphrase = getpassphrase -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> @@ -98,7 +98,7 @@ __getpass(const char *prompt, int size) (void) fputs(prompt, fi); p = pbuf; while (!intrupt && - (c = GETC(fi)) != '\n' && c != '\r' && c != EOF) { + (c = GETC(fi)) != '\n' && c != '\r' && c != EOF) { if (p < &pbuf[ size ]) *p++ = (char)c; } diff --git a/usr/src/lib/libc/port/stdio/gets.c b/usr/src/lib/libc/port/stdio/gets.c index 5aacf35465..7e3f1967ec 100644 --- a/usr/src/lib/libc/port/stdio/gets.c +++ b/usr/src/lib/libc/port/stdio/gets.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/getw.c b/usr/src/lib/libc/port/stdio/getw.c index ab3f20574d..cca7732a00 100644 --- a/usr/src/lib/libc/port/stdio/getw.c +++ b/usr/src/lib/libc/port/stdio/getw.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * The intent here is to provide a means to make the order of @@ -36,9 +35,9 @@ * in the memory while doing the io a `word' at a time. */ -#pragma weak getw = _getw +#pragma weak _getw = getw -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/mse.c b/usr/src/lib/libc/port/stdio/mse.c index bf3c823640..4d5ee6874a 100644 --- a/usr/src/lib/libc/port/stdio/mse.c +++ b/usr/src/lib/libc/port/stdio/mse.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "mbstatet.h" #include "file64.h" @@ -137,7 +137,7 @@ _get_internal_mbstate(int item) lmutex_lock(&__top_mbstates_lock); if (__top_mbstates == NULL) { __top_mbstates = - lmalloc((_MAX_MB_FUNC + 1) * sizeof (mbstate_t *)); + lmalloc((_MAX_MB_FUNC + 1) * sizeof (mbstate_t *)); if (__top_mbstates == NULL) { lmutex_unlock(&__top_mbstates_lock); return (NULL); @@ -203,8 +203,7 @@ __mbst_get_consumed_array(const mbstate_t *ps, char *str, /* The max size of __consumed[] is 8 */ return (-1); } - (void) memcpy((void *)str, (const void *)&ps->__consumed[index], - len); + (void) memcpy((void *)str, (const void *)&ps->__consumed[index], len); return (0); } @@ -217,8 +216,7 @@ __mbst_set_consumed_array(mbstate_t *ps, const char *str, /* The max size of __consumed[] is 8 */ return (-1); } - (void) memcpy((void *)&ps->__consumed[index], (const void *)str, - len); + (void) memcpy((void *)&ps->__consumed[index], (const void *)str, len); return (0); } diff --git a/usr/src/lib/libc/port/stdio/popen.c b/usr/src/lib/libc/port/stdio/popen.c index 899e19d05b..9ceb9cc42a 100644 --- a/usr/src/lib/libc/port/stdio/popen.c +++ b/usr/src/lib/libc/port/stdio/popen.c @@ -29,10 +29,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak pclose = _pclose -#pragma weak popen = _popen +#pragma weak _pclose = pclose +#pragma weak _popen = popen -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include "file64.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/putc.c b/usr/src/lib/libc/port/stdio/putc.c index 2770af552c..05383201a3 100644 --- a/usr/src/lib/libc/port/stdio/putc.c +++ b/usr/src/lib/libc/port/stdio/putc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak putc_unlocked = _putc_unlocked +#pragma weak _putc_unlocked = putc_unlocked -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> @@ -43,7 +42,6 @@ #include "mse.h" #undef putc - #undef putc_unlocked int @@ -68,7 +66,7 @@ putc(int ch, FILE *iop) int -_putc_unlocked(int ch, FILE *iop) +putc_unlocked(int ch, FILE *iop) { if (--iop->_cnt < 0) return (__flsbuf((unsigned char) ch, iop)); diff --git a/usr/src/lib/libc/port/stdio/putchar.c b/usr/src/lib/libc/port/stdio/putchar.c index 5cef46dc80..fce981d014 100644 --- a/usr/src/lib/libc/port/stdio/putchar.c +++ b/usr/src/lib/libc/port/stdio/putchar.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,22 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * A subroutine version of the macro putchar */ -#pragma weak putchar_unlocked = _putchar_unlocked - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <stdio.h> #include <thread.h> @@ -55,14 +52,14 @@ putchar(ch) return (putc(ch, iop)); } -#undef _putchar_unlocked +#undef putchar_unlocked /* * A subroutine version of the macro putchar_unlocked */ int -_putchar_unlocked(ch) +putchar_unlocked(ch) int ch; { FILE *iop = stdout; diff --git a/usr/src/lib/libc/port/stdio/puts.c b/usr/src/lib/libc/port/stdio/puts.c index 213dc93f5f..84279dcb1d 100644 --- a/usr/src/lib/libc/port/stdio/puts.c +++ b/usr/src/lib/libc/port/stdio/puts.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/putw.c b/usr/src/lib/libc/port/stdio/putw.c index 8cad40a887..043125e113 100644 --- a/usr/src/lib/libc/port/stdio/putw.c +++ b/usr/src/lib/libc/port/stdio/putw.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * The intent here is to provide a means to make the order of @@ -36,9 +35,9 @@ * in the memory while doing the io a `word' at a time. */ -#pragma weak putw = _putw +#pragma weak _putw = putw -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/rewind.c b/usr/src/lib/libc/port/stdio/rewind.c index 06cc555790..57e4cc2540 100644 --- a/usr/src/lib/libc/port/stdio/rewind.c +++ b/usr/src/lib/libc/port/stdio/rewind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/scanf.c b/usr/src/lib/libc/port/stdio/scanf.c index d5b769e0e2..31c8d09f5e 100644 --- a/usr/src/lib/libc/port/stdio/scanf.c +++ b/usr/src/lib/libc/port/stdio/scanf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/setbuf.c b/usr/src/lib/libc/port/stdio/setbuf.c index efd2bea743..78c4c8cc76 100644 --- a/usr/src/lib/libc/port/stdio/setbuf.c +++ b/usr/src/lib/libc/port/stdio/setbuf.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,8 +29,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/setbuffer.c b/usr/src/lib/libc/port/stdio/setbuffer.c index 97a4dcc69d..4f3ef505cd 100644 --- a/usr/src/lib/libc/port/stdio/setbuffer.c +++ b/usr/src/lib/libc/port/stdio/setbuffer.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,7 +30,7 @@ * Compatibility wrappers for setbuffer and setlinebuf */ -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <stdio.h> #include <stdlib.h> diff --git a/usr/src/lib/libc/port/stdio/setvbuf.c b/usr/src/lib/libc/port/stdio/setvbuf.c index 40a075637f..a6e63e09f7 100644 --- a/usr/src/lib/libc/port/stdio/setvbuf.c +++ b/usr/src/lib/libc/port/stdio/setvbuf.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,8 +29,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" - -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/system.c b/usr/src/lib/libc/port/stdio/system.c index cef2648ced..d27a194095 100644 --- a/usr/src/lib/libc/port/stdio/system.c +++ b/usr/src/lib/libc/port/stdio/system.c @@ -24,12 +24,12 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#include "synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" + +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <sys/wait.h> diff --git a/usr/src/lib/libc/port/stdio/tempnam.c b/usr/src/lib/libc/port/stdio/tempnam.c index e3dfdf9cc1..a2d4c42cc9 100644 --- a/usr/src/lib/libc/port/stdio/tempnam.c +++ b/usr/src/lib/libc/port/stdio/tempnam.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tempnam = _tempnam +#pragma weak _tempnam = tempnam -#include "synonyms.h" +#include "lint.h" #include <mtlib.h> #include <sys/types.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/tmpfile.c b/usr/src/lib/libc/port/stdio/tmpfile.c index 723b15011c..884a7a369a 100644 --- a/usr/src/lib/libc/port/stdio/tmpfile.c +++ b/usr/src/lib/libc/port/stdio/tmpfile.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * tmpfile - return a pointer to an update file that can be @@ -36,7 +35,7 @@ * go away if the program using it terminates. */ -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/stdio/tmpnam_r.c b/usr/src/lib/libc/port/stdio/tmpnam_r.c index 5c2e6f3ab9..003235c6a7 100644 --- a/usr/src/lib/libc/port/stdio/tmpnam_r.c +++ b/usr/src/lib/libc/port/stdio/tmpnam_r.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak tmpnam = _tmpnam -#pragma weak tmpnam_r = _tmpnam_r - -#include "synonyms.h" +#include "lint.h" #include "mtlib.h" #include <sys/types.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/ungetc.c b/usr/src/lib/libc/port/stdio/ungetc.c index dfa831e977..8fb8fa40e9 100644 --- a/usr/src/lib/libc/port/stdio/ungetc.c +++ b/usr/src/lib/libc/port/stdio/ungetc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <sys/types.h> diff --git a/usr/src/lib/libc/port/stdio/vscanf.c b/usr/src/lib/libc/port/stdio/vscanf.c index 1ca2e8db2d..c41093ee7a 100644 --- a/usr/src/lib/libc/port/stdio/vscanf.c +++ b/usr/src/lib/libc/port/stdio/vscanf.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,14 +29,13 @@ #pragma ident "%Z%%M% %I% %E% SMI" - #ifndef _C89_INTMAX32 -#pragma weak vscanf = _vscanf -#pragma weak vfscanf = _vfscanf -#pragma weak vsscanf = _vsscanf +#pragma weak _vscanf = vscanf +#pragma weak _vfscanf = vfscanf +#pragma weak _vsscanf = vsscanf #endif -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include "mtlib.h" #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/vwscanf.c b/usr/src/lib/libc/port/stdio/vwscanf.c index 684163a496..7448e6ffad 100644 --- a/usr/src/lib/libc/port/stdio/vwscanf.c +++ b/usr/src/lib/libc/port/stdio/vwscanf.c @@ -20,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <mtlib.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/stdio/wscanf.c b/usr/src/lib/libc/port/stdio/wscanf.c index 5b42ec9d51..a1c0873bce 100644 --- a/usr/src/lib/libc/port/stdio/wscanf.c +++ b/usr/src/lib/libc/port/stdio/wscanf.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" +#include "lint.h" #include "file64.h" #include <mtlib.h> #include <stdio.h> diff --git a/usr/src/lib/libc/port/sys/_autofssys.c b/usr/src/lib/libc/port/sys/_autofssys.c index 0f0ceb7312..7ef381e791 100644 --- a/usr/src/lib/libc/port/sys/_autofssys.c +++ b/usr/src/lib/libc/port/sys/_autofssys.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/fs/autofs.h> diff --git a/usr/src/lib/libc/port/sys/acctctl.c b/usr/src/lib/libc/port/sys/acctctl.c index 4dfa279e05..b54c5c54be 100644 --- a/usr/src/lib/libc/port/sys/acctctl.c +++ b/usr/src/lib/libc/port/sys/acctctl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1999-2000 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -#ident "%Z%%M% %I% %E% SMI" - -#pragma weak acctctl = _acctctl +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/bsd_signal.c b/usr/src/lib/libc/port/sys/bsd_signal.c index 3e24c28c51..4679935945 100644 --- a/usr/src/lib/libc/port/sys/bsd_signal.c +++ b/usr/src/lib/libc/port/sys/bsd_signal.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak bsd_signal = _bsd_signal +#pragma weak _bsd_signal = bsd_signal -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <errno.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/sys/corectl.c b/usr/src/lib/libc/port/sys/corectl.c index 67138b54fc..bc4302d39f 100644 --- a/usr/src/lib/libc/port/sys/corectl.c +++ b/usr/src/lib/libc/port/sys/corectl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,29 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 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" -#pragma weak core_set_options = _core_set_options -#pragma weak core_get_options = _core_get_options -#pragma weak core_set_global_content = _core_set_global_content -#pragma weak core_get_global_content = _core_get_global_content -#pragma weak core_set_global_path = _core_set_global_path -#pragma weak core_get_global_path = _core_get_global_path -#pragma weak core_set_default_content = _core_set_default_content -#pragma weak core_get_default_content = _core_get_default_content -#pragma weak core_set_default_path = _core_set_default_path -#pragma weak core_get_default_path = _core_get_default_path -#pragma weak core_set_process_content = _core_set_process_content -#pragma weak core_get_process_content = _core_get_process_content -#pragma weak core_set_process_path = _core_set_process_path -#pragma weak core_get_process_path = _core_get_process_path - -#include "synonyms.h" +#include "lint.h" #include <sys/corectl.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/exacctsys.c b/usr/src/lib/libc/port/sys/exacctsys.c index 017545c262..78780b164a 100644 --- a/usr/src/lib/libc/port/sys/exacctsys.c +++ b/usr/src/lib/libc/port/sys/exacctsys.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,19 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak getacct = _getacct -#pragma weak putacct = _putacct -#pragma weak wracct = _wracct +#pragma weak _getacct = getacct +#pragma weak _putacct = putacct +#pragma weak _wracct = wracct -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/procset.h> @@ -42,7 +42,7 @@ getacct(idtype_t idtype, id_t id, void *buf, size_t bufsize) int error; error = __systemcall(&rval, SYS_exacctsys, - 0, idtype, id, buf, bufsize, 0); + 0, idtype, id, buf, bufsize, 0); if (error) (void) __set_errno(error); return ((size_t)rval.sys_rval1); diff --git a/usr/src/lib/libc/port/sys/execl.c b/usr/src/lib/libc/port/sys/execl.c index cdfcb1508d..74859317c9 100644 --- a/usr/src/lib/libc/port/sys/execl.c +++ b/usr/src/lib/libc/port/sys/execl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,25 +18,25 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * execl(name, arg0, arg1, ..., argn, 0) * environment automatically passed. */ -#pragma weak execl = _execl +#pragma weak _execl = execl -#include "synonyms.h" +#include "lint.h" #include <alloca.h> #include <malloc.h> #include <stdarg.h> diff --git a/usr/src/lib/libc/port/sys/execle.c b/usr/src/lib/libc/port/sys/execle.c index ecaa7965f4..53419b6c80 100644 --- a/usr/src/lib/libc/port/sys/execle.c +++ b/usr/src/lib/libc/port/sys/execle.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,24 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * execle(file, arg1, arg2, ..., 0, envp) */ -#pragma weak execle = _execle +#pragma weak _execle = execle -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <alloca.h> #include <malloc.h> diff --git a/usr/src/lib/libc/port/sys/execv.c b/usr/src/lib/libc/port/sys/execv.c index 8b5608f173..1458d3c2b2 100644 --- a/usr/src/lib/libc/port/sys/execv.c +++ b/usr/src/lib/libc/port/sys/execv.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * execv(file, argv) @@ -38,9 +37,9 @@ * environment passed automatically */ -#pragma weak execv = _execv +#pragma weak _execv = execv -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/sys/faccessat.c b/usr/src/lib/libc/port/sys/faccessat.c index ee328b9e7b..9cfc8994fc 100644 --- a/usr/src/lib/libc/port/sys/faccessat.c +++ b/usr/src/lib/libc/port/sys/faccessat.c @@ -18,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/fsmisc.c b/usr/src/lib/libc/port/sys/fsmisc.c index 491cc73732..1070cb8f12 100644 --- a/usr/src/lib/libc/port/sys/fsmisc.c +++ b/usr/src/lib/libc/port/sys/fsmisc.c @@ -18,19 +18,19 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#pragma weak fchownat = _fchownat -#pragma weak renameat = _renameat -#pragma weak futimesat = _futimesat -#pragma weak unlinkat = _unlinkat +#pragma weak _fchownat = fchownat +#pragma weak _futimesat = futimesat +#pragma weak _unlinkat = unlinkat -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/stat.h> diff --git a/usr/src/lib/libc/port/sys/fstatat.c b/usr/src/lib/libc/port/sys/fstatat.c index e919879073..15c9d3b0cb 100644 --- a/usr/src/lib/libc/port/sys/fstatat.c +++ b/usr/src/lib/libc/port/sys/fstatat.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 -#pragma weak fstatat64 = _fstatat64 +#pragma weak _fstatat64 = fstatat64 #else -#pragma weak fstatat = _fstatat +#pragma weak _fstatat = fstatat #endif -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/stat.h> diff --git a/usr/src/lib/libc/port/sys/getpagesizes.c b/usr/src/lib/libc/port/sys/getpagesizes.c index 86c5944fd9..74f6dadd86 100644 --- a/usr/src/lib/libc/port/sys/getpagesizes.c +++ b/usr/src/lib/libc/port/sys/getpagesizes.c @@ -18,17 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#pragma weak getpagesizes = _getpagesizes -#pragma weak getpagesizes2 = _getpagesizes2 - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <unistd.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/getpeerucred.c b/usr/src/lib/libc/port/sys/getpeerucred.c index 5712f12a33..97d62cc0ca 100644 --- a/usr/src/lib/libc/port/sys/getpeerucred.c +++ b/usr/src/lib/libc/port/sys/getpeerucred.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak getpeerucred = _getpeerucred +#pragma weak _getpeerucred = getpeerucred -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/inst_sync.c b/usr/src/lib/libc/port/sys/inst_sync.c index 2da71160b7..2c0fdbf62c 100644 --- a/usr/src/lib/libc/port/sys/inst_sync.c +++ b/usr/src/lib/libc/port/sys/inst_sync.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 2000 by 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" -#pragma weak inst_sync = _inst_sync - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/instance.h> diff --git a/usr/src/lib/libc/port/sys/issetugid.c b/usr/src/lib/libc/port/sys/issetugid.c index 2185bf9397..eea5ea28b8 100644 --- a/usr/src/lib/libc/port/sys/issetugid.c +++ b/usr/src/lib/libc/port/sys/issetugid.c @@ -18,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#pragma weak issetugid = _issetugid +#pragma weak _issetugid = issetugid -#include "synonyms.h" +#include "lint.h" #include <sys/syscall.h> #include <sys/priv.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/sys/label.c b/usr/src/lib/libc/port/sys/label.c index 15c476ba8d..0eb5b39514 100644 --- a/usr/src/lib/libc/port/sys/label.c +++ b/usr/src/lib/libc/port/sys/label.c @@ -18,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" -#pragma weak is_system_labeled = _is_system_labeled - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/tsol/tsyscall.h> diff --git a/usr/src/lib/libc/port/sys/libc_fcntl.c b/usr/src/lib/libc/port/sys/libc_fcntl.c index 4cb69394ba..beab99f74c 100644 --- a/usr/src/lib/libc/port/sys/libc_fcntl.c +++ b/usr/src/lib/libc/port/sys/libc_fcntl.c @@ -29,7 +29,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/param.h> #include <sys/sockio.h> #include <sys/filio.h> @@ -58,13 +58,12 @@ extern int __fcntl_syscall(int fd, int cmd, ...); /* * XXX these hacks are needed for X.25 which assumes that s_fcntl and * s_ioctl exist in the socket library. - * There is no need for _s_ioctl for other purposes. + * There is no need for s_ioctl for other purposes. */ #pragma weak s_fcntl = __fcntl #pragma weak _s_fcntl = __fcntl -#pragma weak s_ioctl = _s_ioctl int -_s_ioctl(int fd, int cmd, intptr_t arg) +s_ioctl(int fd, int cmd, intptr_t arg) { return (ioctl(fd, cmd, arg)); } diff --git a/usr/src/lib/libc/port/sys/libc_link.c b/usr/src/lib/libc/port/sys/libc_link.c index 2f57a799bf..f0f4356871 100644 --- a/usr/src/lib/libc/port/sys/libc_link.c +++ b/usr/src/lib/libc/port/sys/libc_link.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 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" -#pragma weak link = _link +#pragma weak _link = link -#include "synonyms.h" +#include "lint.h" #include <stdlib.h> #include <errno.h> #include <unistd.h> diff --git a/usr/src/lib/libc/port/sys/libc_open.c b/usr/src/lib/libc/port/sys/libc_open.c index 42629f8bbf..ad9d07d7fd 100644 --- a/usr/src/lib/libc/port/sys/libc_open.c +++ b/usr/src/lib/libc/port/sys/libc_open.c @@ -29,7 +29,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/mkdev.h> #include <limits.h> #include <stdarg.h> diff --git a/usr/src/lib/libc/port/sys/lockf.c b/usr/src/lib/libc/port/sys/lockf.c index eb6d41bcdf..bc66901ab0 100644 --- a/usr/src/lib/libc/port/sys/lockf.c +++ b/usr/src/lib/libc/port/sys/lockf.c @@ -24,18 +24,18 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + #include <sys/feature_tests.h> #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 #define __lockf __lockf64 #endif -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <unistd.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/sys/lwp.c b/usr/src/lib/libc/port/sys/lwp.c index 69882e116d..cd33da8464 100644 --- a/usr/src/lib/libc/port/sys/lwp.c +++ b/usr/src/lib/libc/port/sys/lwp.c @@ -26,16 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak _lwp_mutex_lock = __lwp_mutex_lock -#pragma weak _lwp_mutex_trylock = __lwp_mutex_trylock -#pragma weak _lwp_sema_init = __lwp_sema_init -#pragma weak _lwp_sema_wait = __lwp_sema_wait -#pragma weak _lwp_suspend = __lwp_suspend -#if defined(__i386) || defined(__amd64) -#pragma weak _lwp_private = __lwp_private -#endif /* __i386 || __amd64 */ - -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <sys/types.h> #include <sys/time.h> @@ -78,15 +69,6 @@ _lwp_sema_wait(lwp_sema_t *sp) return (___lwp_sema_timedwait(sp, NULL, 0)); } -#if defined(__x86) -int -_lwp_private(int cmd, int which, void *sbase) -{ - extern int ___lwp_private(int, int, void *); - return (___lwp_private(cmd, which, sbase)); -} -#endif /* __x86 */ - int _lwp_suspend(lwpid_t lwpid) { diff --git a/usr/src/lib/libc/port/sys/lwp_cond.c b/usr/src/lib/libc/port/sys/lwp_cond.c index 82a990f169..9f0c4da3b8 100644 --- a/usr/src/lib/libc/port/sys/lwp_cond.c +++ b/usr/src/lib/libc/port/sys/lwp_cond.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak _lwp_cond_wait = __lwp_cond_wait -#pragma weak _lwp_cond_reltimedwait = __lwp_cond_reltimedwait -#pragma weak _lwp_cond_timedwait = __lwp_cond_timedwait - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <time.h> @@ -75,7 +71,7 @@ int _lwp_cond_timedwait(cond_t *cv, mutex_t *mp, timespec_t *absts) { extern void abstime_to_reltime(clockid_t, - const timespec_t *, timespec_t *); + const timespec_t *, timespec_t *); timespec_t tslocal; abstime_to_reltime(CLOCK_REALTIME, absts, &tslocal); diff --git a/usr/src/lib/libc/port/sys/lwp_rwlock.c b/usr/src/lib/libc/port/sys/lwp_rwlock.c index 6a3766dfcb..009d88b3f3 100644 --- a/usr/src/lib/libc/port/sys/lwp_rwlock.c +++ b/usr/src/lib/libc/port/sys/lwp_rwlock.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <synch.h> #include <time.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/sys/lwp_sigmask.c b/usr/src/lib/libc/port/sys/lwp_sigmask.c index c719cb267f..708124cfd0 100644 --- a/usr/src/lib/libc/port/sys/lwp_sigmask.c +++ b/usr/src/lib/libc/port/sys/lwp_sigmask.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <signal.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/meminfosys.c b/usr/src/lib/libc/port/sys/meminfosys.c index a2343aeaa2..d84e4bf4d2 100644 --- a/usr/src/lib/libc/port/sys/meminfosys.c +++ b/usr/src/lib/libc/port/sys/meminfosys.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak meminfo = _meminfo +#pragma weak _meminfo = meminfo -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/mman.h> diff --git a/usr/src/lib/libc/port/sys/msgsys.c b/usr/src/lib/libc/port/sys/msgsys.c index 966bcc6975..997c14fee6 100644 --- a/usr/src/lib/libc/port/sys/msgsys.c +++ b/usr/src/lib/libc/port/sys/msgsys.c @@ -24,18 +24,17 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma weak msgctl = _msgctl -#pragma weak msgctl64 = _msgctl64 -#pragma weak msgget = _msgget -#pragma weak msgids = _msgids -#pragma weak msgsnap = _msgsnap +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma weak _msgctl = msgctl +#pragma weak _msgget = msgget +#pragma weak _msgids = msgids +#pragma weak _msgsnap = msgsnap -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/ipc.h> #include <sys/ipc_impl.h> diff --git a/usr/src/lib/libc/port/sys/nfssys.c b/usr/src/lib/libc/port/sys/nfssys.c index da66e39e88..b16cf75d8e 100644 --- a/usr/src/lib/libc/port/sys/nfssys.c +++ b/usr/src/lib/libc/port/sys/nfssys.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,11 +34,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak exportfs = _exportfs -#pragma weak nfs_getfh = _nfs_getfh -#pragma weak nfssvc = _nfssvc - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/types32.h> #include <rpc/types.h> diff --git a/usr/src/lib/libc/port/sys/openat.c b/usr/src/lib/libc/port/sys/openat.c index 483a88a948..0a15a8746d 100644 --- a/usr/src/lib/libc/port/sys/openat.c +++ b/usr/src/lib/libc/port/sys/openat.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <stdarg.h> #include <sys/types.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/pgrpsys.c b/usr/src/lib/libc/port/sys/pgrpsys.c index f155f0d861..f2cca14d7a 100644 --- a/usr/src/lib/libc/port/sys/pgrpsys.c +++ b/usr/src/lib/libc/port/sys/pgrpsys.c @@ -26,14 +26,14 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getpgrp = _getpgrp -#pragma weak setpgrp = _setpgrp -#pragma weak getsid = _getsid -#pragma weak setsid = _setsid -#pragma weak getpgid = _getpgid -#pragma weak setpgid = _setpgid +#pragma weak _getpgrp = getpgrp +#pragma weak _setpgrp = setpgrp +#pragma weak _getsid = getsid +#pragma weak _setsid = setsid +#pragma weak _getpgid = getpgid +#pragma weak _setpgid = setpgid -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <unistd.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/posix_sigwait.c b/usr/src/lib/libc/port/sys/posix_sigwait.c index 3f2eb068da..31ee08bbc4 100644 --- a/usr/src/lib/libc/port/sys/posix_sigwait.c +++ b/usr/src/lib/libc/port/sys/posix_sigwait.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,7 +43,7 @@ __posix_sigwait(const sigset_t *setp, int *signo) int oerrno = errno; errno = 0; - if ((*signo = _sigwait((sigset_t *)setp)) == -1) { + if ((*signo = sigwait((sigset_t *)setp)) == -1) { if (errno == 0) errno = EINVAL; else diff --git a/usr/src/lib/libc/port/sys/ppriv.c b/usr/src/lib/libc/port/sys/ppriv.c index 6ab4add91e..6a1992c38c 100644 --- a/usr/src/lib/libc/port/sys/ppriv.c +++ b/usr/src/lib/libc/port/sys/ppriv.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,19 +18,20 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak setppriv = _setppriv -#pragma weak getppriv = _getppriv -#pragma weak setpflags = _setpflags -#pragma weak getpflags = _getpflags +#pragma weak _setppriv = setppriv +#pragma weak _getppriv = getppriv +#pragma weak _setpflags = setpflags +#pragma weak _getpflags = getpflags -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include "priv_private.h" @@ -76,7 +76,7 @@ int setpflags(uint_t flag, uint_t val) { return (syscall(SYS_privsys, PRIVSYS_SETPFLAGS, (priv_op_t)flag, - (priv_ptype_t)(uintptr_t)val, 0, 0)); + (priv_ptype_t)(uintptr_t)val, 0, 0)); } uint_t diff --git a/usr/src/lib/libc/port/sys/psetsys.c b/usr/src/lib/libc/port/sys/psetsys.c index 5de5d62591..05ee9a78e4 100644 --- a/usr/src/lib/libc/port/sys/psetsys.c +++ b/usr/src/lib/libc/port/sys/psetsys.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,24 +18,25 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak pset_create = _pset_create -#pragma weak pset_destroy = _pset_destroy -#pragma weak pset_assign = _pset_assign -#pragma weak pset_info = _pset_info -#pragma weak pset_bind = _pset_bind -#pragma weak pset_getloadavg = _pset_getloadavg -#pragma weak pset_list = _pset_list -#pragma weak pset_setattr = _pset_setattr -#pragma weak pset_getattr = _pset_getattr - -#include "synonyms.h" +#pragma weak _pset_create = pset_create +#pragma weak _pset_destroy = pset_destroy +#pragma weak _pset_assign = pset_assign +#pragma weak _pset_info = pset_info +#pragma weak _pset_bind = pset_bind +#pragma weak _pset_getloadavg = pset_getloadavg +#pragma weak _pset_list = pset_list +#pragma weak _pset_setattr = pset_setattr +#pragma weak _pset_getattr = pset_getattr + +#include "lint.h" #include <sys/types.h> #include <sys/procset.h> #include <sys/processor.h> diff --git a/usr/src/lib/libc/port/sys/rctlsys.c b/usr/src/lib/libc/port/sys/rctlsys.c index 9e395d3048..d43bdc2842 100644 --- a/usr/src/lib/libc/port/sys/rctlsys.c +++ b/usr/src/lib/libc/port/sys/rctlsys.c @@ -18,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#pragma weak setrctl = _setrctl -#pragma weak getrctl = _getrctl -#pragma weak rctllist = _rctllist -#pragma weak rctlctl = _rctlctl -#pragma weak setprojrctl = _setprojrctl +#pragma weak _getrctl = getrctl +#pragma weak _setrctl = setrctl -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/rctl.h> diff --git a/usr/src/lib/libc/port/sys/sbrk.c b/usr/src/lib/libc/port/sys/sbrk.c index 2d1ec6eeb8..156f7bd797 100644 --- a/usr/src/lib/libc/port/sys/sbrk.c +++ b/usr/src/lib/libc/port/sys/sbrk.c @@ -26,10 +26,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak sbrk = _sbrk -#pragma weak brk = _brk +#pragma weak _sbrk = sbrk +#pragma weak _brk = brk -#include "synonyms.h" +#include "lint.h" #include <synch.h> #include <errno.h> #include <sys/isa_defs.h> @@ -45,7 +45,7 @@ void *_nd = &_end; mutex_t __sbrk_lock = DEFAULTMUTEX; extern int _brk_unlocked(void *); -static void *_sbrk_unlocked(intptr_t); +extern void *_sbrk_unlocked(intptr_t); /* * The break must always be at least 8-byte aligned @@ -84,7 +84,7 @@ sbrk(intptr_t addend) * - the addend is negative and brk + addend < 0. * - the addend is positive and brk + addend > ULONG_MAX */ -static void * +void * _sbrk_unlocked(intptr_t addend) { char *old_brk = BRKALIGN(_nd); diff --git a/usr/src/lib/libc/port/sys/semsys.c b/usr/src/lib/libc/port/sys/semsys.c index 8e6b35e4b3..81cee7ed47 100644 --- a/usr/src/lib/libc/port/sys/semsys.c +++ b/usr/src/lib/libc/port/sys/semsys.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,25 +18,25 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak semctl = _semctl -#pragma weak semctl64 = _semctl64 -#pragma weak semget = _semget -#pragma weak semop = _semop -#pragma weak semids = _semids -#pragma weak semtimedop = _semtimedop +#pragma weak _semctl = semctl +#pragma weak _semctl64 = semctl64 +#pragma weak _semget = semget +#pragma weak _semop = semop +#pragma weak _semids = semids +#pragma weak _semtimedop = semtimedop -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/ipc.h> #include <sys/ipc_impl.h> diff --git a/usr/src/lib/libc/port/sys/sharefs.c b/usr/src/lib/libc/port/sys/sharefs.c index 42e0db738a..adb76ec2cd 100644 --- a/usr/src/lib/libc/port/sys/sharefs.c +++ b/usr/src/lib/libc/port/sys/sharefs.c @@ -26,7 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/types32.h> #include <rpc/types.h> diff --git a/usr/src/lib/libc/port/sys/shmsys.c b/usr/src/lib/libc/port/sys/shmsys.c index c4b5d8edb1..141dedf1c9 100644 --- a/usr/src/lib/libc/port/sys/shmsys.c +++ b/usr/src/lib/libc/port/sys/shmsys.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,25 +18,25 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak shmat = _shmat -#pragma weak shmctl = _shmctl -#pragma weak shmctl64 = _shmctl64 -#pragma weak shmdt = _shmdt -#pragma weak shmget = _shmget -#pragma weak shmids = _shmids +#pragma weak _shmat = shmat +#pragma weak _shmctl = shmctl +#pragma weak _shmctl64 = shmctl64 +#pragma weak _shmdt = shmdt +#pragma weak _shmget = shmget +#pragma weak _shmids = shmids -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/ipc.h> #include <sys/ipc_impl.h> diff --git a/usr/src/lib/libc/port/sys/sidsys.c b/usr/src/lib/libc/port/sys/sidsys.c index d1ccabd2f4..258052561b 100644 --- a/usr/src/lib/libc/port/sys/sidsys.c +++ b/usr/src/lib/libc/port/sys/sidsys.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,7 +30,7 @@ * UID/SID mapping system call entries. */ -#include "synonyms.h" +#include "lint.h" #include <sys/sid.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/siginterrupt.c b/usr/src/lib/libc/port/sys/siginterrupt.c index 3f82478de8..ac52538abe 100644 --- a/usr/src/lib/libc/port/sys/siginterrupt.c +++ b/usr/src/lib/libc/port/sys/siginterrupt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak siginterrupt = _siginterrupt - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <errno.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/sys/signal.c b/usr/src/lib/libc/port/sys/signal.c index 757dedd70b..d02613f271 100644 --- a/usr/src/lib/libc/port/sys/signal.c +++ b/usr/src/lib/libc/port/sys/signal.c @@ -26,13 +26,13 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak signal = _signal -#pragma weak sighold = _sighold -#pragma weak sigrelse = _sigrelse -#pragma weak sigignore = _sigignore -#pragma weak sigset = _sigset +#pragma weak _signal = signal +#pragma weak _sighold = sighold +#pragma weak _sigrelse = sigrelse +#pragma weak _sigignore = sigignore +#pragma weak _sigset = sigset -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <unistd.h> #include <errno.h> diff --git a/usr/src/lib/libc/port/sys/sigpending.c b/usr/src/lib/libc/port/sys/sigpending.c index 9084a97506..888ca48eb7 100644 --- a/usr/src/lib/libc/port/sys/sigpending.c +++ b/usr/src/lib/libc/port/sys/sigpending.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,17 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak sigpending = _sigpending +#pragma weak _sigpending = sigpending -#include "synonyms.h" +#include "lint.h" #include <signal.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/sigstack.c b/usr/src/lib/libc/port/sys/sigstack.c index 9f34b2386a..615d3577c7 100644 --- a/usr/src/lib/libc/port/sys/sigstack.c +++ b/usr/src/lib/libc/port/sys/sigstack.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,9 +29,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak sigstack = _sigstack - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/ucontext.h> #include <signal.h> diff --git a/usr/src/lib/libc/port/sys/tasksys.c b/usr/src/lib/libc/port/sys/tasksys.c index d93cf01cee..82b169a9a5 100644 --- a/usr/src/lib/libc/port/sys/tasksys.c +++ b/usr/src/lib/libc/port/sys/tasksys.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,19 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1999-2001 by 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" -#pragma weak settaskid = _settaskid -#pragma weak gettaskid = _gettaskid -#pragma weak getprojid = _getprojid +#pragma weak _settaskid = settaskid +#pragma weak _gettaskid = gettaskid +#pragma weak _getprojid = getprojid -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/task.h> @@ -43,7 +43,8 @@ settaskid(projid_t project, uint_t flags) taskid_t newtaskid; while ((newtaskid = syscall(SYS_tasksys, 0, project, flags, NULL, 0)) - == -1 && errno == EINTR); + == -1 && errno == EINTR) + continue; return (newtaskid); } diff --git a/usr/src/lib/libc/port/sys/time.c b/usr/src/lib/libc/port/sys/time.c index ea95dd0fac..7e7b642ad5 100644 --- a/usr/src/lib/libc/port/sys/time.c +++ b/usr/src/lib/libc/port/sys/time.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak time = _time -#pragma weak stime = _stime +#pragma weak _time = time +#pragma weak _stime = stime -#include "synonyms.h" +#include "lint.h" #include <unistd.h> #include <time.h> diff --git a/usr/src/lib/libc/port/sys/ucontext.c b/usr/src/lib/libc/port/sys/ucontext.c index f86e8c06c1..8b00de64dc 100644 --- a/usr/src/lib/libc/port/sys/ucontext.c +++ b/usr/src/lib/libc/port/sys/ucontext.c @@ -26,10 +26,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getustack = _getustack -#pragma weak setustack = _setustack +#pragma weak _getustack = getustack +#pragma weak _setustack = setustack -#include "synonyms.h" +#include "lint.h" #include <ucontext.h> #include <sys/syscall.h> diff --git a/usr/src/lib/libc/port/sys/umount.c b/usr/src/lib/libc/port/sys/umount.c index c7c52d71dd..1941b647df 100644 --- a/usr/src/lib/libc/port/sys/umount.c +++ b/usr/src/lib/libc/port/sys/umount.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,9 +33,9 @@ * through umount2() system call. */ -#pragma weak umount = _umount +#pragma weak _umount = umount -#include "synonyms.h" +#include "lint.h" #include "libc.h" int diff --git a/usr/src/lib/libc/port/sys/ustat.c b/usr/src/lib/libc/port/sys/ustat.c index 312763bf11..639cbccebb 100644 --- a/usr/src/lib/libc/port/sys/ustat.c +++ b/usr/src/lib/libc/port/sys/ustat.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#pragma weak ustat = _ustat - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <ustat.h> #include <sys/utssys.h> diff --git a/usr/src/lib/libc/port/sys/zone.c b/usr/src/lib/libc/port/sys/zone.c index 7c747d9c97..5129e5d576 100644 --- a/usr/src/lib/libc/port/sys/zone.c +++ b/usr/src/lib/libc/port/sys/zone.c @@ -18,18 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 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" -#pragma weak getzoneid = _getzoneid -#pragma weak getzoneidbyname = _getzoneidbyname -#pragma weak getzonenamebyid = _getzonenamebyid - -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/syscall.h> #include <sys/zone.h> diff --git a/usr/src/lib/libc/port/threads/assfail.c b/usr/src/lib/libc/port/threads/assfail.c index 5a911d2875..54fbe959a0 100644 --- a/usr/src/lib/libc/port/threads/assfail.c +++ b/usr/src/lib/libc/port/threads/assfail.c @@ -69,7 +69,7 @@ Abort(const char *msg) panic_thread = self; lwpid = self->ul_lwpid; } else { - lwpid = __lwp_self(); + lwpid = _lwp_self(); } /* set SIGABRT signal handler to SIG_DFL w/o grabbing any locks */ @@ -82,8 +82,8 @@ Abort(const char *msg) (void) sigaddset(&sigmask, SIGABRT); (void) __lwp_sigmask(SIG_UNBLOCK, &sigmask, NULL); - (void) __lwp_kill(lwpid, SIGABRT); /* never returns */ - (void) _kill(getpid(), SIGABRT); /* if it does, try harder */ + (void) _lwp_kill(lwpid, SIGABRT); /* never returns */ + (void) kill(getpid(), SIGABRT); /* if it does, try harder */ _exit(127); } @@ -182,7 +182,7 @@ lock_error(const mutex_t *mp, const char *who, void *cv, const char *msg) } else { self = NULL; (void) _lwp_mutex_lock(&assert_lock); - lwpid = __lwp_self(); + lwpid = _lwp_self(); udp = &__uberdata; pid = getpid(); } @@ -200,7 +200,7 @@ lock_error(const mutex_t *mp, const char *who, void *cv, const char *msg) if (msg != NULL) { (void) strcat(buf, ": "); (void) strcat(buf, msg); - } else if (!mutex_is_held(&mcopy)) { + } else if (!mutex_held(&mcopy)) { (void) strcat(buf, ": calling thread does not own the lock"); } else if (mcopy.mutex_rcount) { (void) strcat(buf, ": mutex rcount = "); @@ -212,7 +212,7 @@ lock_error(const mutex_t *mp, const char *who, void *cv, const char *msg) ultos((uint64_t)(uintptr_t)self, 16, buf + strlen(buf)); (void) strcat(buf, " thread-id "); ultos((uint64_t)lwpid, 10, buf + strlen(buf)); - if (msg != NULL || mutex_is_held(&mcopy)) + if (msg != NULL || mutex_held(&mcopy)) /* EMPTY */; else if (mcopy.mutex_lockw == 0) (void) strcat(buf, "\nthe lock is unowned"); @@ -269,7 +269,7 @@ rwlock_error(const rwlock_t *rp, const char *who, const char *msg) } else { self = NULL; (void) _lwp_mutex_lock(&assert_lock); - lwpid = __lwp_self(); + lwpid = _lwp_self(); udp = &__uberdata; pid = getpid(); } @@ -347,7 +347,7 @@ thread_error(const char *msg) } else { self = NULL; (void) _lwp_mutex_lock(&assert_lock); - lwpid = __lwp_self(); + lwpid = _lwp_self(); udp = &__uberdata; } @@ -395,7 +395,7 @@ __assfail(const char *assertion, const char *filename, int line_num) } else { self = NULL; (void) _lwp_mutex_lock(&assert_lock); - lwpid = __lwp_self(); + lwpid = _lwp_self(); } (void) strcpy(buf, "assertion failed for thread "); diff --git a/usr/src/lib/libc/port/threads/cancel.c b/usr/src/lib/libc/port/threads/cancel.c index 5236ff5073..8a77f42088 100644 --- a/usr/src/lib/libc/port/threads/cancel.c +++ b/usr/src/lib/libc/port/threads/cancel.c @@ -34,9 +34,8 @@ * If the target thread has already exited no action is taken. * Else send SIGCANCEL to request the other thread to cancel itself. */ -#pragma weak pthread_cancel = _pthread_cancel int -_pthread_cancel(thread_t tid) +pthread_cancel(thread_t tid) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -77,7 +76,7 @@ _pthread_cancel(thread_t tid) /* * Request the other thread to cancel itself. */ - error = __lwp_kill(tid, SIGCANCEL); + error = _lwp_kill(tid, SIGCANCEL); ulwp_unlock(ulwp, udp); } @@ -91,9 +90,8 @@ _pthread_cancel(thread_t tid) * is pending, then the thread is cancelled right here. * Otherwise, pthread_setcancelstate() is not a cancellation point. */ -#pragma weak pthread_setcancelstate = _pthread_setcancelstate int -_pthread_setcancelstate(int state, int *oldstate) +pthread_setcancelstate(int state, int *oldstate) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -130,7 +128,7 @@ _pthread_setcancelstate(int state, int *oldstate) if ((!self->ul_cancel_disabled || !was_disabled) && self->ul_cancel_async && self->ul_cancel_pending) { ulwp_unlock(self, udp); - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); } ulwp_unlock(self, udp); @@ -149,9 +147,8 @@ _pthread_setcancelstate(int state, int *oldstate) * If the type is being set as ASYNC, then it becomes * a cancellation point if there is a cancellation pending. */ -#pragma weak pthread_setcanceltype = _pthread_setcanceltype int -_pthread_setcanceltype(int type, int *oldtype) +pthread_setcanceltype(int type, int *oldtype) { ulwp_t *self = curthread; int was_async; @@ -184,7 +181,7 @@ _pthread_setcanceltype(int type, int *oldtype) if ((self->ul_cancel_async || was_async) && self->ul_cancel_pending && !self->ul_cancel_disabled) { exit_critical(self); - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); } exit_critical(self); @@ -204,14 +201,13 @@ _pthread_setcanceltype(int type, int *oldtype) * it by calling thr_exit. thr_exit takes care of calling * cleanup handlers. */ -#pragma weak pthread_testcancel = _pthread_testcancel void -_pthread_testcancel(void) +pthread_testcancel(void) { ulwp_t *self = curthread; if (self->ul_cancel_pending && !self->ul_cancel_disabled) - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); } /* @@ -229,7 +225,7 @@ _cancelon() ASSERT(self->ul_cancelable >= 0); self->ul_cancelable++; if (self->ul_cancel_pending) - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); } } @@ -245,7 +241,7 @@ _canceloff() ASSERT(!(self->ul_cancelable && self->ul_cancel_disabled)); if (!self->ul_cancel_disabled) { if (self->ul_cancel_pending) - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); self->ul_cancelable--; ASSERT(self->ul_cancelable >= 0); } diff --git a/usr/src/lib/libc/port/threads/door_calls.c b/usr/src/lib/libc/port/threads/door_calls.c index a298722759..3dae1445d8 100644 --- a/usr/src/lib/libc/port/threads/door_calls.c +++ b/usr/src/lib/libc/port/threads/door_calls.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#pragma weak door_create = _door_create -#pragma weak door_ucred = _door_ucred -#pragma weak door_cred = _door_cred -#pragma weak door_return = _door_return -#pragma weak door_server_create = _door_server_create - -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include "libc.h" diff --git a/usr/src/lib/libc/port/threads/pthr_attr.c b/usr/src/lib/libc/port/threads/pthr_attr.c index 8809209083..3bbd1c0f1a 100644 --- a/usr/src/lib/libc/port/threads/pthr_attr.c +++ b/usr/src/lib/libc/port/threads/pthr_attr.c @@ -57,9 +57,9 @@ def_thrattr(void) * pthread_attr_init: allocates the attribute object and initializes it * with the default values. */ -#pragma weak pthread_attr_init = _pthread_attr_init +#pragma weak _pthread_attr_init = pthread_attr_init int -_pthread_attr_init(pthread_attr_t *attr) +pthread_attr_init(pthread_attr_t *attr) { thrattr_t *ap; @@ -75,9 +75,8 @@ _pthread_attr_init(pthread_attr_t *attr) * pthread_attr_destroy: frees the attribute object and invalidates it * with NULL value. */ -#pragma weak pthread_attr_destroy = _pthread_attr_destroy int -_pthread_attr_destroy(pthread_attr_t *attr) +pthread_attr_destroy(pthread_attr_t *attr) { if (attr == NULL || attr->__pthread_attrp == NULL) return (EINVAL); @@ -87,10 +86,10 @@ _pthread_attr_destroy(pthread_attr_t *attr) } /* - * _pthread_attr_clone: make a copy of a pthread_attr_t. + * pthread_attr_clone: make a copy of a pthread_attr_t. */ int -_pthread_attr_clone(pthread_attr_t *attr, const pthread_attr_t *old_attr) +pthread_attr_clone(pthread_attr_t *attr, const pthread_attr_t *old_attr) { thrattr_t *ap; const thrattr_t *old_ap = @@ -106,12 +105,12 @@ _pthread_attr_clone(pthread_attr_t *attr, const pthread_attr_t *old_attr) } /* - * _pthread_attr_equal: compare two pthread_attr_t's, return 1 if equal. + * pthread_attr_equal: compare two pthread_attr_t's, return 1 if equal. * A NULL pthread_attr_t pointer implies default attributes. * This is a consolidation-private interface, for librt. */ int -_pthread_attr_equal(const pthread_attr_t *attr1, const pthread_attr_t *attr2) +pthread_attr_equal(const pthread_attr_t *attr1, const pthread_attr_t *attr2) { const thrattr_t *ap1 = attr1? attr1->__pthread_attrp : def_thrattr(); const thrattr_t *ap2 = attr2? attr2->__pthread_attrp : def_thrattr(); @@ -126,9 +125,8 @@ _pthread_attr_equal(const pthread_attr_t *attr1, const pthread_attr_t *attr2) * be PTHREAD_STACK_MIN (MINSTACK). * This is equivalent to stksize argument in thr_create(). */ -#pragma weak pthread_attr_setstacksize = _pthread_attr_setstacksize int -_pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) +pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) { thrattr_t *ap; @@ -143,9 +141,9 @@ _pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) /* * pthread_attr_getstacksize: gets the user stack size. */ -#pragma weak pthread_attr_getstacksize = _pthread_attr_getstacksize +#pragma weak _pthread_attr_getstacksize = pthread_attr_getstacksize int -_pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize) +pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize) { thrattr_t *ap; @@ -161,9 +159,8 @@ _pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize) * pthread_attr_setstackaddr: sets the user stack addr. * This is equivalent to stkaddr argument in thr_create(). */ -#pragma weak pthread_attr_setstackaddr = _pthread_attr_setstackaddr int -_pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) +pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) { thrattr_t *ap; @@ -177,9 +174,9 @@ _pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) /* * pthread_attr_getstackaddr: gets the user stack addr. */ -#pragma weak pthread_attr_getstackaddr = _pthread_attr_getstackaddr +#pragma weak _pthread_attr_getstackaddr = pthread_attr_getstackaddr int -_pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) +pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) { thrattr_t *ap; @@ -195,9 +192,8 @@ _pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) * pthread_attr_setdetachstate: sets the detach state to DETACHED or JOINABLE. * PTHREAD_CREATE_DETACHED is equivalent to thr_create(THR_DETACHED). */ -#pragma weak pthread_attr_setdetachstate = _pthread_attr_setdetachstate int -_pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) +pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) { thrattr_t *ap; @@ -213,9 +209,9 @@ _pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) /* * pthread_attr_getdetachstate: gets the detach state. */ -#pragma weak pthread_attr_getdetachstate = _pthread_attr_getdetachstate +#pragma weak _pthread_attr_getdetachstate = pthread_attr_getdetachstate int -_pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) +pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) { thrattr_t *ap; @@ -233,7 +229,7 @@ _pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) * For now, this is a private interface in libc. */ int -_pthread_attr_setdaemonstate_np(pthread_attr_t *attr, int daemonstate) +pthread_attr_setdaemonstate_np(pthread_attr_t *attr, int daemonstate) { thrattr_t *ap; @@ -251,7 +247,7 @@ _pthread_attr_setdaemonstate_np(pthread_attr_t *attr, int daemonstate) * For now, this is a private interface in libc. */ int -_pthread_attr_getdaemonstate_np(const pthread_attr_t *attr, int *daemonstate) +pthread_attr_getdaemonstate_np(const pthread_attr_t *attr, int *daemonstate) { thrattr_t *ap; @@ -267,9 +263,8 @@ _pthread_attr_getdaemonstate_np(const pthread_attr_t *attr, int *daemonstate) * pthread_attr_setscope: sets the scope to SYSTEM or PROCESS. * This is equivalent to setting THR_BOUND flag in thr_create(). */ -#pragma weak pthread_attr_setscope = _pthread_attr_setscope int -_pthread_attr_setscope(pthread_attr_t *attr, int scope) +pthread_attr_setscope(pthread_attr_t *attr, int scope) { thrattr_t *ap; @@ -285,9 +280,9 @@ _pthread_attr_setscope(pthread_attr_t *attr, int scope) /* * pthread_attr_getscope: gets the scheduling scope. */ -#pragma weak pthread_attr_getscope = _pthread_attr_getscope +#pragma weak _pthread_attr_getscope = pthread_attr_getscope int -_pthread_attr_getscope(const pthread_attr_t *attr, int *scope) +pthread_attr_getscope(const pthread_attr_t *attr, int *scope) { thrattr_t *ap; @@ -303,9 +298,8 @@ _pthread_attr_getscope(const pthread_attr_t *attr, int *scope) * pthread_attr_setinheritsched: sets the scheduling parameters to be * EXPLICIT or INHERITED from parent thread. */ -#pragma weak pthread_attr_setinheritsched = _pthread_attr_setinheritsched int -_pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit) +pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit) { thrattr_t *ap; @@ -321,9 +315,9 @@ _pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit) /* * pthread_attr_getinheritsched: gets the scheduling inheritance. */ -#pragma weak pthread_attr_getinheritsched = _pthread_attr_getinheritsched +#pragma weak _pthread_attr_getinheritsched = pthread_attr_getinheritsched int -_pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit) +pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit) { thrattr_t *ap; @@ -338,9 +332,8 @@ _pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit) /* * pthread_attr_setschedpolicy: sets the scheduling policy. */ -#pragma weak pthread_attr_setschedpolicy = _pthread_attr_setschedpolicy int -_pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) +pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) { thrattr_t *ap; @@ -355,9 +348,9 @@ _pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) /* * pthread_attr_getpolicy: gets the scheduling policy. */ -#pragma weak pthread_attr_getschedpolicy = _pthread_attr_getschedpolicy +#pragma weak _pthread_attr_getschedpolicy = pthread_attr_getschedpolicy int -_pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) +pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) { thrattr_t *ap; @@ -373,9 +366,8 @@ _pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) * pthread_attr_setschedparam: sets the scheduling parameters. * Currently, we support priority only. */ -#pragma weak pthread_attr_setschedparam = _pthread_attr_setschedparam int -_pthread_attr_setschedparam(pthread_attr_t *attr, +pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param) { thrattr_t *ap; @@ -392,9 +384,9 @@ _pthread_attr_setschedparam(pthread_attr_t *attr, * pthread_attr_getschedparam: gets the scheduling parameters. * Currently, only priority is defined as sched parameter. */ -#pragma weak pthread_attr_getschedparam = _pthread_attr_getschedparam +#pragma weak _pthread_attr_getschedparam = pthread_attr_getschedparam int -_pthread_attr_getschedparam(const pthread_attr_t *attr, +pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param) { thrattr_t *ap; @@ -411,9 +403,8 @@ _pthread_attr_getschedparam(const pthread_attr_t *attr, * UNIX98 * pthread_attr_setguardsize: sets the guardsize */ -#pragma weak pthread_attr_setguardsize = _pthread_attr_setguardsize int -_pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) +pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) { thrattr_t *ap; @@ -428,9 +419,8 @@ _pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) * UNIX98 * pthread_attr_getguardsize: gets the guardsize */ -#pragma weak pthread_attr_getguardsize = _pthread_attr_getguardsize int -_pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) +pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) { thrattr_t *ap; @@ -447,9 +437,8 @@ _pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) * This is equivalent to the stack_base and stack_size arguments * to thr_create(). */ -#pragma weak pthread_attr_setstack = _pthread_attr_setstack int -_pthread_attr_setstack(pthread_attr_t *attr, +pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t stacksize) { thrattr_t *ap; @@ -466,9 +455,8 @@ _pthread_attr_setstack(pthread_attr_t *attr, /* * pthread_attr_getstack: gets the user stack addr and stack size. */ -#pragma weak pthread_attr_getstack = _pthread_attr_getstack int -_pthread_attr_getstack(const pthread_attr_t *attr, +pthread_attr_getstack(const pthread_attr_t *attr, void **stackaddr, size_t *stacksize) { thrattr_t *ap; diff --git a/usr/src/lib/libc/port/threads/pthr_barrier.c b/usr/src/lib/libc/port/threads/pthr_barrier.c index e57bb31ece..dd4cf1e60a 100644 --- a/usr/src/lib/libc/port/threads/pthr_barrier.c +++ b/usr/src/lib/libc/port/threads/pthr_barrier.c @@ -37,9 +37,8 @@ typedef struct { int pshared; } barrierattr_t; -#pragma weak pthread_barrierattr_init = _pthread_barrierattr_init int -_pthread_barrierattr_init(pthread_barrierattr_t *attr) +pthread_barrierattr_init(pthread_barrierattr_t *attr) { barrierattr_t *ap; @@ -50,9 +49,8 @@ _pthread_barrierattr_init(pthread_barrierattr_t *attr) return (0); } -#pragma weak pthread_barrierattr_destroy = _pthread_barrierattr_destroy int -_pthread_barrierattr_destroy(pthread_barrierattr_t *attr) +pthread_barrierattr_destroy(pthread_barrierattr_t *attr) { if (attr == NULL || attr->__pthread_barrierattrp == NULL) return (EINVAL); @@ -61,9 +59,8 @@ _pthread_barrierattr_destroy(pthread_barrierattr_t *attr) return (0); } -#pragma weak pthread_barrierattr_setpshared = _pthread_barrierattr_setpshared int -_pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared) +pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared) { barrierattr_t *ap; @@ -75,9 +72,8 @@ _pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared) return (0); } -#pragma weak pthread_barrierattr_getpshared = _pthread_barrierattr_getpshared int -_pthread_barrierattr_getpshared(const pthread_barrierattr_t *attr, int *pshared) +pthread_barrierattr_getpshared(const pthread_barrierattr_t *attr, int *pshared) { barrierattr_t *ap; @@ -88,9 +84,8 @@ _pthread_barrierattr_getpshared(const pthread_barrierattr_t *attr, int *pshared) return (0); } -#pragma weak pthread_barrier_init = _pthread_barrier_init int -_pthread_barrier_init(pthread_barrier_t *barrier, +pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, uint_t count) { mutex_t *mp = (mutex_t *)&barrier->__pthread_barrier_lock; @@ -113,20 +108,19 @@ _pthread_barrier_init(pthread_barrier_t *barrier, barrier->__pthread_barrier_current = count; barrier->__pthread_barrier_cycle = 0; barrier->__pthread_barrier_reserved = 0; - (void) __mutex_init(mp, type, NULL); - (void) _cond_init(cvp, type, NULL); + (void) mutex_init(mp, type, NULL); + (void) cond_init(cvp, type, NULL); return (0); } -#pragma weak pthread_barrier_destroy = _pthread_barrier_destroy int -_pthread_barrier_destroy(pthread_barrier_t *barrier) +pthread_barrier_destroy(pthread_barrier_t *barrier) { mutex_t *mp = (mutex_t *)&barrier->__pthread_barrier_lock; cond_t *cvp = (cond_t *)&barrier->__pthread_barrier_cond; - (void) __mutex_destroy(mp); - (void) _cond_destroy(cvp); + (void) mutex_destroy(mp); + (void) cond_destroy(cvp); (void) memset(barrier, -1, sizeof (*barrier)); return (0); } @@ -134,33 +128,32 @@ _pthread_barrier_destroy(pthread_barrier_t *barrier) /* * pthread_barrier_wait() is not a cancellation point; */ -#pragma weak pthread_barrier_wait = _pthread_barrier_wait int -_pthread_barrier_wait(pthread_barrier_t *barrier) +pthread_barrier_wait(pthread_barrier_t *barrier) { mutex_t *mp = (mutex_t *)&barrier->__pthread_barrier_lock; cond_t *cvp = (cond_t *)&barrier->__pthread_barrier_cond; uint64_t cycle; int cancel_state; - (void) __mutex_lock(mp); + (void) mutex_lock(mp); if (--barrier->__pthread_barrier_current == 0) { barrier->__pthread_barrier_cycle++; barrier->__pthread_barrier_current = barrier->__pthread_barrier_count; - (void) __mutex_unlock(mp); - (void) _cond_broadcast(cvp); + (void) mutex_unlock(mp); + (void) cond_broadcast(cvp); return (PTHREAD_BARRIER_SERIAL_THREAD); } - (void) _pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state); + (void) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state); cycle = barrier->__pthread_barrier_cycle; do { - (void) _cond_wait(cvp, mp); + (void) cond_wait(cvp, mp); } while (cycle == barrier->__pthread_barrier_cycle); - (void) _pthread_setcancelstate(cancel_state, NULL); + (void) pthread_setcancelstate(cancel_state, NULL); - (void) __mutex_unlock(mp); + (void) mutex_unlock(mp); return (0); } diff --git a/usr/src/lib/libc/port/threads/pthr_cond.c b/usr/src/lib/libc/port/threads/pthr_cond.c index 90e4e3443a..b22bc27cf2 100644 --- a/usr/src/lib/libc/port/threads/pthr_cond.c +++ b/usr/src/lib/libc/port/threads/pthr_cond.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,9 +33,9 @@ * pthread_condattr_init: allocates the cond attribute object and * initializes it with the default values. */ -#pragma weak pthread_condattr_init = _pthread_condattr_init +#pragma weak _pthread_condattr_init = pthread_condattr_init int -_pthread_condattr_init(pthread_condattr_t *attr) +pthread_condattr_init(pthread_condattr_t *attr) { cvattr_t *ap; @@ -51,9 +51,8 @@ _pthread_condattr_init(pthread_condattr_t *attr) * pthread_condattr_destroy: frees the cond attribute object and * invalidates it with NULL value. */ -#pragma weak pthread_condattr_destroy = _pthread_condattr_destroy int -_pthread_condattr_destroy(pthread_condattr_t *attr) +pthread_condattr_destroy(pthread_condattr_t *attr) { if (attr == NULL || attr->__pthread_condattrp == NULL) return (EINVAL); @@ -65,9 +64,8 @@ _pthread_condattr_destroy(pthread_condattr_t *attr) /* * pthread_condattr_setclock: sets the clockid attribute. */ -#pragma weak pthread_condattr_setclock = _pthread_condattr_setclock int -_pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id) +pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id) { cvattr_t *ap; @@ -82,9 +80,8 @@ _pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id) /* * pthread_condattr_getclock: gets the shared attr. */ -#pragma weak pthread_condattr_getclock = _pthread_condattr_getclock int -_pthread_condattr_getclock(const pthread_condattr_t *attr, clockid_t *clock_id) +pthread_condattr_getclock(const pthread_condattr_t *attr, clockid_t *clock_id) { cvattr_t *ap; @@ -101,9 +98,8 @@ _pthread_condattr_getclock(const pthread_condattr_t *attr, clockid_t *clock_id) * pthread_condattr_setpshared: sets the shared attr to PRIVATE or SHARED. * This is equivalent to setting USYNC_PROCESS/USYNC_THREAD flag in cond_init(). */ -#pragma weak pthread_condattr_setpshared = _pthread_condattr_setpshared int -_pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared) +pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared) { cvattr_t *ap; @@ -119,9 +115,9 @@ _pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared) /* * pthread_condattr_getpshared: gets the shared attr. */ -#pragma weak pthread_condattr_getpshared = _pthread_condattr_getpshared +#pragma weak _pthread_condattr_getpshared = pthread_condattr_getpshared int -_pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared) +pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared) { cvattr_t *ap; @@ -137,9 +133,9 @@ _pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared) * pthread_cond_init: Initializes the cond object. It copies the * pshared attr into type argument and calls cond_init(). */ -#pragma weak pthread_cond_init = _pthread_cond_init +#pragma weak _pthread_cond_init = pthread_cond_init int -_pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) +pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) { cvattr_t *ap; int type; @@ -158,7 +154,7 @@ _pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_HIGHRES) error = EINVAL; - else if ((error = _cond_init((cond_t *)cond, type, NULL)) == 0) + else if ((error = cond_init((cond_t *)cond, type, NULL)) == 0) ((cond_t *)cond)->cond_clockid = (uint8_t)clock_id; return (error); diff --git a/usr/src/lib/libc/port/threads/pthr_mutex.c b/usr/src/lib/libc/port/threads/pthr_mutex.c index d3f54c2c71..2451e5e0e8 100644 --- a/usr/src/lib/libc/port/threads/pthr_mutex.c +++ b/usr/src/lib/libc/port/threads/pthr_mutex.c @@ -34,9 +34,9 @@ * pthread_mutexattr_init: allocates the mutex attribute object and * initializes it with the default values. */ -#pragma weak pthread_mutexattr_init = _pthread_mutexattr_init +#pragma weak _pthread_mutexattr_init = pthread_mutexattr_init int -_pthread_mutexattr_init(pthread_mutexattr_t *attr) +pthread_mutexattr_init(pthread_mutexattr_t *attr) { mattr_t *ap; @@ -54,9 +54,8 @@ _pthread_mutexattr_init(pthread_mutexattr_t *attr) * pthread_mutexattr_destroy: frees the mutex attribute object and * invalidates it with NULL value. */ -#pragma weak pthread_mutexattr_destroy = _pthread_mutexattr_destroy int -_pthread_mutexattr_destroy(pthread_mutexattr_t *attr) +pthread_mutexattr_destroy(pthread_mutexattr_t *attr) { if (attr == NULL || attr->__pthread_mutexattrp == NULL) return (EINVAL); @@ -71,9 +70,8 @@ _pthread_mutexattr_destroy(pthread_mutexattr_t *attr) * This is equivalent to setting the USYNC_THREAD/USYNC_PROCESS * flag in mutex_init(). */ -#pragma weak pthread_mutexattr_setpshared = _pthread_mutexattr_setpshared int -_pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) +pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) { mattr_t *ap; @@ -88,9 +86,9 @@ _pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) /* * pthread_mutexattr_getpshared: gets the shared attribute. */ -#pragma weak pthread_mutexattr_getpshared = _pthread_mutexattr_getpshared +#pragma weak _pthread_mutexattr_getpshared = pthread_mutexattr_getpshared int -_pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr, int *pshared) +pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr, int *pshared) { mattr_t *ap; @@ -104,10 +102,8 @@ _pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr, int *pshared) /* * pthread_mutexattr_setprioceiling: sets the prioceiling attribute. */ -#pragma weak pthread_mutexattr_setprioceiling = \ - _pthread_mutexattr_setprioceiling int -_pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int prioceiling) +pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int prioceiling) { const pcclass_t *pccp = get_info_by_policy(SCHED_FIFO); mattr_t *ap; @@ -122,10 +118,10 @@ _pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int prioceiling) /* * pthread_mutexattr_getprioceiling: gets the prioceiling attribute. */ -#pragma weak pthread_mutexattr_getprioceiling = \ - _pthread_mutexattr_getprioceiling +#pragma weak _pthread_mutexattr_getprioceiling = \ + pthread_mutexattr_getprioceiling int -_pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *ceiling) +pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *ceiling) { mattr_t *ap; @@ -139,9 +135,8 @@ _pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *ceiling) /* * pthread_mutexattr_setprotocol: sets the protocol attribute. */ -#pragma weak pthread_mutexattr_setprotocol = _pthread_mutexattr_setprotocol int -_pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol) +pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol) { mattr_t *ap; @@ -158,9 +153,9 @@ _pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol) /* * pthread_mutexattr_getprotocol: gets the protocol attribute. */ -#pragma weak pthread_mutexattr_getprotocol = _pthread_mutexattr_getprotocol +#pragma weak _pthread_mutexattr_getprotocol = pthread_mutexattr_getprotocol int -_pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *protocol) +pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *protocol) { mattr_t *ap; @@ -175,10 +170,8 @@ _pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *protocol) * pthread_mutexattr_setrobust_np: sets the robustness attribute * to PTHREAD_MUTEX_ROBUST_NP or PTHREAD_MUTEX_STALL_NP. */ -#pragma weak pthread_mutexattr_setrobust_np = \ - _pthread_mutexattr_setrobust_np int -_pthread_mutexattr_setrobust_np(pthread_mutexattr_t *attr, int robust) +pthread_mutexattr_setrobust_np(pthread_mutexattr_t *attr, int robust) { mattr_t *ap; @@ -193,10 +186,8 @@ _pthread_mutexattr_setrobust_np(pthread_mutexattr_t *attr, int robust) /* * pthread_mutexattr_getrobust_np: gets the robustness attribute. */ -#pragma weak pthread_mutexattr_getrobust_np = \ - _pthread_mutexattr_getrobust_np int -_pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr, int *robust) +pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr, int *robust) { mattr_t *ap; @@ -211,9 +202,10 @@ _pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr, int *robust) * pthread_mutex_init: Initializes the mutex object. It copies the * various attributes into one type argument and calls mutex_init(). */ -#pragma weak pthread_mutex_init = _pthread_mutex_init +#pragma weak _pthread_mutex_init = pthread_mutex_init int -_pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) +pthread_mutex_init(pthread_mutex_t *_RESTRICT_KYWD mutex, + const pthread_mutexattr_t *_RESTRICT_KYWD attr) { mattr_t *ap; int type; @@ -245,9 +237,8 @@ _pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) * We pass the MUTEX_NOCEIL flag to mutex_lock_internal() so that * a non-realtime thread can successfully execute this operation. */ -#pragma weak pthread_mutex_setprioceiling = _pthread_mutex_setprioceiling int -_pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int ceil, int *oceil) +pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int ceil, int *oceil) { mutex_t *mp = (mutex_t *)mutex; const pcclass_t *pccp = get_info_by_policy(SCHED_FIFO); @@ -269,9 +260,9 @@ _pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int ceil, int *oceil) /* * pthread_mutex_getprioceiling: gets the prioceiling. */ -#pragma weak pthread_mutex_getprioceiling = _pthread_mutex_getprioceiling +#pragma weak _pthread_mutex_getprioceiling = pthread_mutex_getprioceiling int -_pthread_mutex_getprioceiling(const pthread_mutex_t *mp, int *ceiling) +pthread_mutex_getprioceiling(const pthread_mutex_t *mp, int *ceiling) { *ceiling = ((mutex_t *)mp)->mutex_ceiling; return (0); @@ -281,9 +272,8 @@ _pthread_mutex_getprioceiling(const pthread_mutex_t *mp, int *ceiling) * UNIX98 * pthread_mutexattr_settype: sets the type attribute */ -#pragma weak pthread_mutexattr_settype = _pthread_mutexattr_settype int -_pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) +pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) { mattr_t *ap; @@ -310,9 +300,8 @@ _pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) * UNIX98 * pthread_mutexattr_gettype: gets the type attribute. */ -#pragma weak pthread_mutexattr_gettype = _pthread_mutexattr_gettype int -_pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *typep) +pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *typep) { mattr_t *ap; int type; diff --git a/usr/src/lib/libc/port/threads/pthr_rwlock.c b/usr/src/lib/libc/port/threads/pthr_rwlock.c index 35f4c809de..39883d7934 100644 --- a/usr/src/lib/libc/port/threads/pthr_rwlock.c +++ b/usr/src/lib/libc/port/threads/pthr_rwlock.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,9 +34,8 @@ * pthread_rwlockattr_init: allocates the mutex attribute object and * initializes it with the default values. */ -#pragma weak pthread_rwlockattr_init = _pthread_rwlockattr_init int -_pthread_rwlockattr_init(pthread_rwlockattr_t *attr) +pthread_rwlockattr_init(pthread_rwlockattr_t *attr) { rwlattr_t *ap; @@ -52,9 +51,8 @@ _pthread_rwlockattr_init(pthread_rwlockattr_t *attr) * pthread_rwlockattr_destroy: frees the rwlock attribute object and * invalidates it with NULL value. */ -#pragma weak pthread_rwlockattr_destroy = _pthread_rwlockattr_destroy int -_pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr) +pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr) { if (attr == NULL || attr->__pthread_rwlockattrp == NULL) return (EINVAL); @@ -67,9 +65,8 @@ _pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr) * UNIX98 * pthread_rwlockattr_setpshared: sets the shared attr to PRIVATE or SHARED. */ -#pragma weak pthread_rwlockattr_setpshared = _pthread_rwlockattr_setpshared int -_pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared) +pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared) { rwlattr_t *ap; @@ -86,9 +83,8 @@ _pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared) * UNIX98 * pthread_rwlockattr_getpshared: gets the shared attr. */ -#pragma weak pthread_rwlockattr_getpshared = _pthread_rwlockattr_getpshared int -_pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *attr, int *pshared) +pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *attr, int *pshared) { rwlattr_t *ap; @@ -105,9 +101,9 @@ _pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *attr, int *pshared) * pthread_rwlock_init: Initializes the rwlock object. It copies the * pshared attr into type argument and calls rwlock_init(). */ -#pragma weak pthread_rwlock_init = _pthread_rwlock_init int -_pthread_rwlock_init(pthread_rwlock_t *rwlock, pthread_rwlockattr_t *attr) +pthread_rwlock_init(pthread_rwlock_t *_RESTRICT_KYWD rwlock, + const pthread_rwlockattr_t *_RESTRICT_KYWD attr) { rwlattr_t *ap; int type; @@ -119,5 +115,5 @@ _pthread_rwlock_init(pthread_rwlock_t *rwlock, pthread_rwlockattr_t *attr) else return (EINVAL); - return (__rwlock_init((rwlock_t *)rwlock, type, NULL)); + return (rwlock_init((rwlock_t *)rwlock, type, NULL)); } diff --git a/usr/src/lib/libc/port/threads/pthread.c b/usr/src/lib/libc/port/threads/pthread.c index 83cc7ec37a..af3ad4b999 100644 --- a/usr/src/lib/libc/port/threads/pthread.c +++ b/usr/src/lib/libc/port/threads/pthread.c @@ -73,7 +73,7 @@ _thr_setparam(pthread_t tid, int policy, int prio) ulwp->ul_rtclassid = cid; ulwp->ul_cid = cid; ulwp->ul_pri = prio; - _membar_producer(); + membar_producer(); ulwp->ul_policy = policy; } ulwp_unlock(ulwp, curthread->ul_uberdata); @@ -85,9 +85,9 @@ _thr_setparam(pthread_t tid, int policy, int prio) * pthread_create: creates a thread in the current process. * calls common _thrp_create() after copying the attributes. */ -#pragma weak pthread_create = _pthread_create +#pragma weak _pthread_create = pthread_create int -_pthread_create(pthread_t *thread, const pthread_attr_t *attr, +pthread_create(pthread_t *thread, const pthread_attr_t *attr, void * (*start_routine)(void *), void *arg) { ulwp_t *self = curthread; @@ -141,7 +141,7 @@ _pthread_create(pthread_t *thread, const pthread_attr_t *attr, } else if (thread) { *thread = tid; } - (void) _thr_continue(tid); + (void) thr_continue(tid); } /* posix version expects EAGAIN for lack of memory */ @@ -154,9 +154,8 @@ _pthread_create(pthread_t *thread, const pthread_attr_t *attr, * pthread_once: calls given function only once. * it synchronizes via mutex in pthread_once_t structure */ -#pragma weak pthread_once = _pthread_once int -_pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) +pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) { __once_t *once = (__once_t *)once_control; @@ -169,12 +168,12 @@ _pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) pthread_cleanup_push(mutex_unlock, &once->mlock); (*init_routine)(); pthread_cleanup_pop(0); - _membar_producer(); + membar_producer(); once->once_flag = PTHREAD_ONCE_DONE; } (void) mutex_unlock(&once->mlock); } - _membar_consumer(); + membar_consumer(); return (0); } @@ -182,9 +181,8 @@ _pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) /* * pthread_equal: equates two thread ids. */ -#pragma weak pthread_equal = _pthread_equal int -_pthread_equal(pthread_t t1, pthread_t t2) +pthread_equal(pthread_t t1, pthread_t t2) { return (t1 == t2); } @@ -192,9 +190,9 @@ _pthread_equal(pthread_t t1, pthread_t t2) /* * pthread_getschedparam: get the thread's sched parameters. */ -#pragma weak pthread_getschedparam = _pthread_getschedparam +#pragma weak _pthread_getschedparam = pthread_getschedparam int -_pthread_getschedparam(pthread_t tid, int *policy, struct sched_param *param) +pthread_getschedparam(pthread_t tid, int *policy, struct sched_param *param) { ulwp_t *ulwp; id_t cid; @@ -218,7 +216,7 @@ _pthread_getschedparam(pthread_t tid, int *policy, struct sched_param *param) ulwp->ul_rtclassid = cid; ulwp->ul_cid = cid; ulwp->ul_pri = param->sched_priority; - _membar_producer(); + membar_producer(); ulwp->ul_policy = *policy; } ulwp_unlock(ulwp, curthread->ul_uberdata); @@ -227,15 +225,15 @@ _pthread_getschedparam(pthread_t tid, int *policy, struct sched_param *param) return (error); } -#pragma weak thr_getprio = _thr_getprio +#pragma weak _thr_getprio = thr_getprio int -_thr_getprio(thread_t tid, int *priority) +thr_getprio(thread_t tid, int *priority) { struct sched_param param; int policy; int error; - if ((error = _pthread_getschedparam(tid, &policy, ¶m)) == 0) + if ((error = pthread_getschedparam(tid, &policy, ¶m)) == 0) *priority = param.sched_priority; return (error); } @@ -243,29 +241,26 @@ _thr_getprio(thread_t tid, int *priority) /* * pthread_setschedparam: sets the sched parameters for a thread. */ -#pragma weak pthread_setschedparam = _pthread_setschedparam int -_pthread_setschedparam(pthread_t tid, +pthread_setschedparam(pthread_t tid, int policy, const struct sched_param *param) { return (_thr_setparam(tid, policy, param->sched_priority)); } -#pragma weak thr_setprio = _thr_setprio -#pragma weak pthread_setschedprio = _thr_setprio -#pragma weak _pthread_setschedprio = _thr_setprio +#pragma weak pthread_setschedprio = thr_setprio int -_thr_setprio(thread_t tid, int prio) +thr_setprio(thread_t tid, int prio) { struct sched_param param; int policy; int error; /* - * _pthread_getschedparam() has the side-effect of setting + * pthread_getschedparam() has the side-effect of setting * the target thread's ul_policy, ul_pri and ul_cid correctly. */ - if ((error = _pthread_getschedparam(tid, &policy, ¶m)) != 0) + if ((error = pthread_getschedparam(tid, &policy, ¶m)) != 0) return (error); if (param.sched_priority == prio) /* no change */ return (0); diff --git a/usr/src/lib/libc/port/threads/rwlock.c b/usr/src/lib/libc/port/threads/rwlock.c index 7a8e70b223..582da6b5c4 100644 --- a/usr/src/lib/libc/port/threads/rwlock.c +++ b/usr/src/lib/libc/port/threads/rwlock.c @@ -133,12 +133,10 @@ rwl_free(ulwp_t *ulwp) /* * Check if a reader version of the lock is held by the current thread. - * rw_read_is_held() is private to libc. */ -#pragma weak rw_read_is_held = _rw_read_held -#pragma weak rw_read_held = _rw_read_held +#pragma weak _rw_read_held = rw_read_held int -_rw_read_held(rwlock_t *rwlp) +rw_read_held(rwlock_t *rwlp) { volatile uint32_t *rwstate = (volatile uint32_t *)&rwlp->rwlock_readers; uint32_t readers; @@ -178,12 +176,10 @@ _rw_read_held(rwlock_t *rwlp) /* * Check if a writer version of the lock is held by the current thread. - * rw_write_is_held() is private to libc. */ -#pragma weak rw_write_is_held = _rw_write_held -#pragma weak rw_write_held = _rw_write_held +#pragma weak _rw_write_held = rw_write_held int -_rw_write_held(rwlock_t *rwlp) +rw_write_held(rwlock_t *rwlp) { volatile uint32_t *rwstate = (volatile uint32_t *)&rwlp->rwlock_readers; uint32_t readers; @@ -203,11 +199,10 @@ _rw_write_held(rwlock_t *rwlp) return (rval); } -#pragma weak rwlock_init = __rwlock_init -#pragma weak _rwlock_init = __rwlock_init +#pragma weak _rwlock_init = rwlock_init /* ARGSUSED2 */ int -__rwlock_init(rwlock_t *rwlp, int type, void *arg) +rwlock_init(rwlock_t *rwlp, int type, void *arg) { if (type != USYNC_THREAD && type != USYNC_PROCESS) return (EINVAL); @@ -227,12 +222,10 @@ __rwlock_init(rwlock_t *rwlp, int type, void *arg) return (0); } -#pragma weak rwlock_destroy = __rwlock_destroy -#pragma weak _rwlock_destroy = __rwlock_destroy -#pragma weak pthread_rwlock_destroy = __rwlock_destroy -#pragma weak _pthread_rwlock_destroy = __rwlock_destroy +#pragma weak pthread_rwlock_destroy = rwlock_destroy +#pragma weak _rwlock_destroy = rwlock_destroy int -__rwlock_destroy(rwlock_t *rwlp) +rwlock_destroy(rwlock_t *rwlp) { /* * Once destroyed, we can no longer be holding a read or write lock. @@ -638,7 +631,7 @@ rw_rdlock_impl(rwlock_t *rwlp, timespec_t *tsp) /* * If we hold the writer lock, bail out. */ - if (rw_write_is_held(rwlp)) { + if (rw_write_held(rwlp)) { if (self->ul_error_detection) rwlock_error(rwlp, "rwlock_rdlock", "calling thread owns the writer lock"); @@ -668,12 +661,10 @@ out: return (error); } -#pragma weak rw_rdlock = __rw_rdlock -#pragma weak _rw_rdlock = __rw_rdlock -#pragma weak pthread_rwlock_rdlock = __rw_rdlock -#pragma weak _pthread_rwlock_rdlock = __rw_rdlock +#pragma weak pthread_rwlock_rdlock = rw_rdlock +#pragma weak _rw_rdlock = rw_rdlock int -__rw_rdlock(rwlock_t *rwlp) +rw_rdlock(rwlock_t *rwlp) { ASSERT(!curthread->ul_critical || curthread->ul_bindflags); return (rw_rdlock_impl(rwlp, NULL)); @@ -686,31 +677,30 @@ lrw_rdlock(rwlock_t *rwlp) (void) rw_rdlock_impl(rwlp, NULL); } -#pragma weak pthread_rwlock_reltimedrdlock_np = \ - _pthread_rwlock_reltimedrdlock_np int -_pthread_rwlock_reltimedrdlock_np(rwlock_t *rwlp, const timespec_t *reltime) +pthread_rwlock_reltimedrdlock_np(pthread_rwlock_t *_RESTRICT_KYWD rwlp, + const struct timespec *_RESTRICT_KYWD reltime) { timespec_t tslocal = *reltime; int error; ASSERT(!curthread->ul_critical || curthread->ul_bindflags); - error = rw_rdlock_impl(rwlp, &tslocal); + error = rw_rdlock_impl((rwlock_t *)rwlp, &tslocal); if (error == ETIME) error = ETIMEDOUT; return (error); } -#pragma weak pthread_rwlock_timedrdlock = _pthread_rwlock_timedrdlock int -_pthread_rwlock_timedrdlock(rwlock_t *rwlp, const timespec_t *abstime) +pthread_rwlock_timedrdlock(pthread_rwlock_t *_RESTRICT_KYWD rwlp, + const struct timespec *_RESTRICT_KYWD abstime) { timespec_t tslocal; int error; ASSERT(!curthread->ul_critical || curthread->ul_bindflags); abstime_to_reltime(CLOCK_REALTIME, abstime, &tslocal); - error = rw_rdlock_impl(rwlp, &tslocal); + error = rw_rdlock_impl((rwlock_t *)rwlp, &tslocal); if (error == ETIME) error = ETIMEDOUT; return (error); @@ -727,7 +717,7 @@ rw_wrlock_impl(rwlock_t *rwlp, timespec_t *tsp) /* * If we hold a readers lock on this rwlock, bail out. */ - if (rw_read_is_held(rwlp)) { + if (rw_read_held(rwlp)) { if (self->ul_error_detection) rwlock_error(rwlp, "rwlock_wrlock", "calling thread owns the readers lock"); @@ -738,7 +728,7 @@ rw_wrlock_impl(rwlock_t *rwlp, timespec_t *tsp) /* * If we hold the writer lock, bail out. */ - if (rw_write_is_held(rwlp)) { + if (rw_write_held(rwlp)) { if (self->ul_error_detection) rwlock_error(rwlp, "rwlock_wrlock", "calling thread owns the writer lock"); @@ -769,12 +759,10 @@ out: return (error); } -#pragma weak rw_wrlock = __rw_wrlock -#pragma weak _rw_wrlock = __rw_wrlock -#pragma weak pthread_rwlock_wrlock = __rw_wrlock -#pragma weak _pthread_rwlock_wrlock = __rw_wrlock +#pragma weak pthread_rwlock_wrlock = rw_wrlock +#pragma weak _rw_wrlock = rw_wrlock int -__rw_wrlock(rwlock_t *rwlp) +rw_wrlock(rwlock_t *rwlp) { ASSERT(!curthread->ul_critical || curthread->ul_bindflags); return (rw_wrlock_impl(rwlp, NULL)); @@ -787,42 +775,37 @@ lrw_wrlock(rwlock_t *rwlp) (void) rw_wrlock_impl(rwlp, NULL); } -#pragma weak pthread_rwlock_reltimedwrlock_np = \ - _pthread_rwlock_reltimedwrlock_np int -_pthread_rwlock_reltimedwrlock_np(rwlock_t *rwlp, const timespec_t *reltime) +pthread_rwlock_reltimedwrlock_np(pthread_rwlock_t *_RESTRICT_KYWD rwlp, + const struct timespec *_RESTRICT_KYWD reltime) { timespec_t tslocal = *reltime; int error; ASSERT(!curthread->ul_critical || curthread->ul_bindflags); - error = rw_wrlock_impl(rwlp, &tslocal); + error = rw_wrlock_impl((rwlock_t *)rwlp, &tslocal); if (error == ETIME) error = ETIMEDOUT; return (error); } -#pragma weak pthread_rwlock_timedwrlock = _pthread_rwlock_timedwrlock int -_pthread_rwlock_timedwrlock(rwlock_t *rwlp, const timespec_t *abstime) +pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlp, const timespec_t *abstime) { timespec_t tslocal; int error; ASSERT(!curthread->ul_critical || curthread->ul_bindflags); abstime_to_reltime(CLOCK_REALTIME, abstime, &tslocal); - error = rw_wrlock_impl(rwlp, &tslocal); + error = rw_wrlock_impl((rwlock_t *)rwlp, &tslocal); if (error == ETIME) error = ETIMEDOUT; return (error); } -#pragma weak rw_tryrdlock = __rw_tryrdlock -#pragma weak _rw_tryrdlock = __rw_tryrdlock -#pragma weak pthread_rwlock_tryrdlock = __rw_tryrdlock -#pragma weak _pthread_rwlock_tryrdlock = __rw_tryrdlock +#pragma weak pthread_rwlock_tryrdlock = rw_tryrdlock int -__rw_tryrdlock(rwlock_t *rwlp) +rw_tryrdlock(rwlock_t *rwlp) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -878,12 +861,9 @@ out: return (error); } -#pragma weak rw_trywrlock = __rw_trywrlock -#pragma weak _rw_trywrlock = __rw_trywrlock -#pragma weak pthread_rwlock_trywrlock = __rw_trywrlock -#pragma weak _pthread_rwlock_trywrlock = __rw_trywrlock +#pragma weak pthread_rwlock_trywrlock = rw_trywrlock int -__rw_trywrlock(rwlock_t *rwlp) +rw_trywrlock(rwlock_t *rwlp) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -920,12 +900,10 @@ __rw_trywrlock(rwlock_t *rwlp) return (error); } -#pragma weak rw_unlock = __rw_unlock -#pragma weak _rw_unlock = __rw_unlock -#pragma weak pthread_rwlock_unlock = __rw_unlock -#pragma weak _pthread_rwlock_unlock = __rw_unlock +#pragma weak pthread_rwlock_unlock = rw_unlock +#pragma weak _rw_unlock = rw_unlock int -__rw_unlock(rwlock_t *rwlp) +rw_unlock(rwlock_t *rwlp) { volatile uint32_t *rwstate = (volatile uint32_t *)&rwlp->rwlock_readers; uint32_t readers; @@ -951,7 +929,7 @@ __rw_unlock(rwlock_t *rwlp) * Since the writer lock is held, we'd better be * holding it, else we cannot legitimately be here. */ - if (!rw_write_is_held(rwlp)) { + if (!rw_write_held(rwlp)) { if (self->ul_error_detection) rwlock_error(rwlp, "rwlock_unlock", "writer lock held, " @@ -1041,6 +1019,6 @@ out: void lrw_unlock(rwlock_t *rwlp) { - (void) __rw_unlock(rwlp); + (void) rw_unlock(rwlp); exit_critical(curthread); } diff --git a/usr/src/lib/libc/port/threads/scalls.c b/usr/src/lib/libc/port/threads/scalls.c index ceb227c9d5..c90ab6cbde 100644 --- a/usr/src/lib/libc/port/threads/scalls.c +++ b/usr/src/lib/libc/port/threads/scalls.c @@ -39,6 +39,46 @@ #include <sys/door.h> /* + * These leading-underbar symbols exist because mistakes were made + * in the past that put them into non-SUNWprivate versions of + * the libc mapfiles. They should be eliminated, but oh well... + */ +#pragma weak _fork = fork +#pragma weak _read = read +#pragma weak _write = write +#pragma weak _getmsg = getmsg +#pragma weak _getpmsg = getpmsg +#pragma weak _putmsg = putmsg +#pragma weak _putpmsg = putpmsg +#pragma weak _sleep = sleep +#pragma weak _close = close +#pragma weak _creat = creat +#pragma weak _fcntl = fcntl +#pragma weak _fsync = fsync +#pragma weak _lockf = lockf +#pragma weak _msgrcv = msgrcv +#pragma weak _msgsnd = msgsnd +#pragma weak _msync = msync +#pragma weak _open = open +#pragma weak _openat = openat +#pragma weak _pause = pause +#pragma weak _readv = readv +#pragma weak _sigpause = sigpause +#pragma weak _sigsuspend = sigsuspend +#pragma weak _tcdrain = tcdrain +#pragma weak _waitid = waitid +#pragma weak _writev = writev + +#if !defined(_LP64) +#pragma weak _creat64 = creat64 +#pragma weak _lockf64 = lockf64 +#pragma weak _open64 = open64 +#pragma weak _openat64 = openat64 +#pragma weak _pread64 = pread64 +#pragma weak _pwrite64 = pwrite64 +#endif + +/* * atfork_lock protects the pthread_atfork() data structures. * * fork_lock does double-duty. Not only does it (and atfork_lock) @@ -100,9 +140,8 @@ callout_lock_exit(void) cancel_safe_mutex_unlock(&curthread->ul_uberdata->callout_lock); } -#pragma weak forkx = _forkx pid_t -_forkx(int flags) +forkx(int flags) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -213,22 +252,19 @@ _forkx(int flags) * The forkall() interface exists for applications that require * the semantics of replicating all threads. */ -#pragma weak fork1 = _fork -#pragma weak _fork1 = _fork -#pragma weak fork = _fork +#pragma weak fork1 = fork pid_t -_fork(void) +fork(void) { - return (_forkx(0)); + return (forkx(0)); } /* * Much of the logic here is the same as in forkx(). * See the comments in forkx(), above. */ -#pragma weak forkallx = _forkallx pid_t -_forkallx(int flags) +forkallx(int flags) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -281,11 +317,10 @@ _forkallx(int flags) return (pid); } -#pragma weak forkall = _forkall pid_t -_forkall(void) +forkall(void) { - return (_forkallx(0)); + return (forkallx(0)); } /* @@ -303,7 +338,7 @@ _forkall(void) if (!self->ul_cancel_disabled) { \ self->ul_cancel_async = 1; \ if (self->ul_cancel_pending) \ - _pthread_exit(PTHREAD_CANCELED); \ + pthread_exit(PTHREAD_CANCELED); \ } \ self->ul_sp = stkptr(); \ } else if (self->ul_cancel_pending && \ @@ -374,7 +409,7 @@ _forkall(void) self->ul_sigsuspend = 0;\ restore_signals(self); \ } \ - _pthread_exit(PTHREAD_CANCELED);\ + pthread_exit(PTHREAD_CANCELED); \ } \ } \ self->ul_sp = stkptr(); \ @@ -415,7 +450,7 @@ _cancel_prologue(void) if (!self->ul_cancel_disabled) { self->ul_cancel_async = 1; if (self->ul_cancel_pending) - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); } self->ul_sp = stkptr(); } else if (self->ul_cancel_pending && @@ -452,9 +487,8 @@ lwp_wait(thread_t tid, thread_t *found) return (error); } -#pragma weak read = _read ssize_t -_read(int fd, void *buf, size_t size) +read(int fd, void *buf, size_t size) { extern ssize_t __read(int, void *, size_t); ssize_t rv; @@ -462,9 +496,8 @@ _read(int fd, void *buf, size_t size) PERFORM(__read(fd, buf, size)) } -#pragma weak write = _write ssize_t -_write(int fd, const void *buf, size_t size) +write(int fd, const void *buf, size_t size) { extern ssize_t __write(int, const void *, size_t); ssize_t rv; @@ -472,9 +505,8 @@ _write(int fd, const void *buf, size_t size) PERFORM(__write(fd, buf, size)) } -#pragma weak getmsg = _getmsg int -_getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, +getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int *flagsp) { extern int __getmsg(int, struct strbuf *, struct strbuf *, int *); @@ -483,9 +515,8 @@ _getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, PERFORM(__getmsg(fd, ctlptr, dataptr, flagsp)) } -#pragma weak getpmsg = _getpmsg int -_getpmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, +getpmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int *bandp, int *flagsp) { extern int __getpmsg(int, struct strbuf *, struct strbuf *, @@ -495,9 +526,8 @@ _getpmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, PERFORM(__getpmsg(fd, ctlptr, dataptr, bandp, flagsp)) } -#pragma weak putmsg = _putmsg int -_putmsg(int fd, const struct strbuf *ctlptr, +putmsg(int fd, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags) { extern int __putmsg(int, const struct strbuf *, @@ -518,9 +548,8 @@ __xpg4_putmsg(int fd, const struct strbuf *ctlptr, PERFORM(__putmsg(fd, ctlptr, dataptr, flags|MSG_XPG4)) } -#pragma weak putpmsg = _putpmsg int -_putpmsg(int fd, const struct strbuf *ctlptr, +putpmsg(int fd, const struct strbuf *ctlptr, const struct strbuf *dataptr, int band, int flags) { extern int __putpmsg(int, const struct strbuf *, @@ -541,9 +570,8 @@ __xpg4_putpmsg(int fd, const struct strbuf *ctlptr, PERFORM(__putpmsg(fd, ctlptr, dataptr, band, flags|MSG_XPG4)) } -#pragma weak nanosleep = _nanosleep int -_nanosleep(const timespec_t *rqtp, timespec_t *rmtp) +nanosleep(const timespec_t *rqtp, timespec_t *rmtp) { int error; @@ -557,9 +585,8 @@ _nanosleep(const timespec_t *rqtp, timespec_t *rmtp) return (0); } -#pragma weak clock_nanosleep = _clock_nanosleep int -_clock_nanosleep(clockid_t clock_id, int flags, +clock_nanosleep(clockid_t clock_id, int flags, const timespec_t *rqtp, timespec_t *rmtp) { timespec_t reltime; @@ -634,9 +661,8 @@ restart: return (error); } -#pragma weak sleep = _sleep unsigned int -_sleep(unsigned int sec) +sleep(unsigned int sec) { unsigned int rem = 0; timespec_t ts; @@ -644,7 +670,7 @@ _sleep(unsigned int sec) ts.tv_sec = (time_t)sec; ts.tv_nsec = 0; - if (_nanosleep(&ts, &tsr) == -1 && errno == EINTR) { + if (nanosleep(&ts, &tsr) == -1 && errno == EINTR) { rem = (unsigned int)tsr.tv_sec; if (tsr.tv_nsec >= NANOSEC / 2) rem++; @@ -652,21 +678,19 @@ _sleep(unsigned int sec) return (rem); } -#pragma weak usleep = _usleep int -_usleep(useconds_t usec) +usleep(useconds_t usec) { timespec_t ts; ts.tv_sec = usec / MICROSEC; ts.tv_nsec = (long)(usec % MICROSEC) * 1000; - (void) _nanosleep(&ts, NULL); + (void) nanosleep(&ts, NULL); return (0); } -#pragma weak close = _close int -_close(int fildes) +close(int fildes) { extern void _aio_close(int); extern int __close(int); @@ -684,9 +708,8 @@ _close(int fildes) PERFORM(__close(fildes)) } -#pragma weak creat = _creat int -_creat(const char *path, mode_t mode) +creat(const char *path, mode_t mode) { extern int __creat(const char *, mode_t); int rv; @@ -695,9 +718,8 @@ _creat(const char *path, mode_t mode) } #if !defined(_LP64) -#pragma weak creat64 = _creat64 int -_creat64(const char *path, mode_t mode) +creat64(const char *path, mode_t mode) { extern int __creat64(const char *, mode_t); int rv; @@ -706,9 +728,8 @@ _creat64(const char *path, mode_t mode) } #endif /* !_LP64 */ -#pragma weak door_call = _door_call int -_door_call(int d, door_arg_t *params) +door_call(int d, door_arg_t *params) { extern int __door_call(int, door_arg_t *); int rv; @@ -716,9 +737,8 @@ _door_call(int d, door_arg_t *params) PERFORM(__door_call(d, params)) } -#pragma weak fcntl = _fcntl int -_fcntl(int fildes, int cmd, ...) +fcntl(int fildes, int cmd, ...) { extern int __fcntl(int, int, ...); intptr_t arg; @@ -733,9 +753,8 @@ _fcntl(int fildes, int cmd, ...) PERFORM(__fcntl(fildes, cmd, arg)) } -#pragma weak fdatasync = _fdatasync int -_fdatasync(int fildes) +fdatasync(int fildes) { extern int __fdsync(int, int); int rv; @@ -743,9 +762,8 @@ _fdatasync(int fildes) PERFORM(__fdsync(fildes, FDSYNC)) } -#pragma weak fsync = _fsync int -_fsync(int fildes) +fsync(int fildes) { extern int __fdsync(int, int); int rv; @@ -753,9 +771,8 @@ _fsync(int fildes) PERFORM(__fdsync(fildes, FSYNC)) } -#pragma weak lockf = _lockf int -_lockf(int fildes, int function, off_t size) +lockf(int fildes, int function, off_t size) { extern int __lockf(int, int, off_t); int rv; @@ -764,9 +781,8 @@ _lockf(int fildes, int function, off_t size) } #if !defined(_LP64) -#pragma weak lockf64 = _lockf64 int -_lockf64(int fildes, int function, off64_t size) +lockf64(int fildes, int function, off64_t size) { extern int __lockf64(int, int, off64_t); int rv; @@ -775,9 +791,8 @@ _lockf64(int fildes, int function, off64_t size) } #endif /* !_LP64 */ -#pragma weak msgrcv = _msgrcv ssize_t -_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg) +msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg) { extern ssize_t __msgrcv(int, void *, size_t, long, int); ssize_t rv; @@ -785,9 +800,8 @@ _msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg) PERFORM(__msgrcv(msqid, msgp, msgsz, msgtyp, msgflg)) } -#pragma weak msgsnd = _msgsnd int -_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg) +msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg) { extern int __msgsnd(int, const void *, size_t, int); int rv; @@ -795,9 +809,8 @@ _msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg) PERFORM(__msgsnd(msqid, msgp, msgsz, msgflg)) } -#pragma weak msync = _msync int -_msync(caddr_t addr, size_t len, int flags) +msync(caddr_t addr, size_t len, int flags) { extern int __msync(caddr_t, size_t, int); int rv; @@ -805,9 +818,8 @@ _msync(caddr_t addr, size_t len, int flags) PERFORM(__msync(addr, len, flags)) } -#pragma weak open = _open int -_open(const char *path, int oflag, ...) +open(const char *path, int oflag, ...) { extern int __open(const char *, int, ...); mode_t mode; @@ -820,9 +832,8 @@ _open(const char *path, int oflag, ...) PERFORM(__open(path, oflag, mode)) } -#pragma weak openat = _openat int -_openat(int fd, const char *path, int oflag, ...) +openat(int fd, const char *path, int oflag, ...) { extern int __openat(int, const char *, int, ...); mode_t mode; @@ -836,9 +847,8 @@ _openat(int fd, const char *path, int oflag, ...) } #if !defined(_LP64) -#pragma weak open64 = _open64 int -_open64(const char *path, int oflag, ...) +open64(const char *path, int oflag, ...) { extern int __open64(const char *, int, ...); mode_t mode; @@ -851,9 +861,8 @@ _open64(const char *path, int oflag, ...) PERFORM(__open64(path, oflag, mode)) } -#pragma weak openat64 = _openat64 int -_openat64(int fd, const char *path, int oflag, ...) +openat64(int fd, const char *path, int oflag, ...) { extern int __openat64(int, const char *, int, ...); mode_t mode; @@ -867,9 +876,8 @@ _openat64(int fd, const char *path, int oflag, ...) } #endif /* !_LP64 */ -#pragma weak pause = _pause int -_pause(void) +pause(void) { extern int __pause(void); int rv; @@ -877,9 +885,8 @@ _pause(void) PERFORM(__pause()) } -#pragma weak pread = _pread ssize_t -_pread(int fildes, void *buf, size_t nbyte, off_t offset) +pread(int fildes, void *buf, size_t nbyte, off_t offset) { extern ssize_t __pread(int, void *, size_t, off_t); ssize_t rv; @@ -888,9 +895,8 @@ _pread(int fildes, void *buf, size_t nbyte, off_t offset) } #if !defined(_LP64) -#pragma weak pread64 = _pread64 ssize_t -_pread64(int fildes, void *buf, size_t nbyte, off64_t offset) +pread64(int fildes, void *buf, size_t nbyte, off64_t offset) { extern ssize_t __pread64(int, void *, size_t, off64_t); ssize_t rv; @@ -899,9 +905,8 @@ _pread64(int fildes, void *buf, size_t nbyte, off64_t offset) } #endif /* !_LP64 */ -#pragma weak pwrite = _pwrite ssize_t -_pwrite(int fildes, const void *buf, size_t nbyte, off_t offset) +pwrite(int fildes, const void *buf, size_t nbyte, off_t offset) { extern ssize_t __pwrite(int, const void *, size_t, off_t); ssize_t rv; @@ -910,9 +915,8 @@ _pwrite(int fildes, const void *buf, size_t nbyte, off_t offset) } #if !defined(_LP64) -#pragma weak pwrite64 = _pwrite64 ssize_t -_pwrite64(int fildes, const void *buf, size_t nbyte, off64_t offset) +pwrite64(int fildes, const void *buf, size_t nbyte, off64_t offset) { extern ssize_t __pwrite64(int, const void *, size_t, off64_t); ssize_t rv; @@ -921,9 +925,8 @@ _pwrite64(int fildes, const void *buf, size_t nbyte, off64_t offset) } #endif /* !_LP64 */ -#pragma weak readv = _readv ssize_t -_readv(int fildes, const struct iovec *iov, int iovcnt) +readv(int fildes, const struct iovec *iov, int iovcnt) { extern ssize_t __readv(int, const struct iovec *, int); ssize_t rv; @@ -931,9 +934,8 @@ _readv(int fildes, const struct iovec *iov, int iovcnt) PERFORM(__readv(fildes, iov, iovcnt)) } -#pragma weak sigpause = _sigpause int -_sigpause(int sig) +sigpause(int sig) { extern int __sigpause(int); int rv; @@ -941,9 +943,8 @@ _sigpause(int sig) PERFORM(__sigpause(sig)) } -#pragma weak sigsuspend = _sigsuspend int -_sigsuspend(const sigset_t *set) +sigsuspend(const sigset_t *set) { extern int __sigsuspend(const sigset_t *); int rv; @@ -968,9 +969,8 @@ _pollsys(struct pollfd *fds, nfds_t nfd, const timespec_t *timeout, return (rv); } -#pragma weak sigtimedwait = _sigtimedwait int -_sigtimedwait(const sigset_t *set, siginfo_t *infop, const timespec_t *timeout) +sigtimedwait(const sigset_t *set, siginfo_t *infop, const timespec_t *timeout) { extern int __sigtimedwait(const sigset_t *, siginfo_t *, const timespec_t *); @@ -996,23 +996,20 @@ _sigtimedwait(const sigset_t *set, siginfo_t *infop, const timespec_t *timeout) return (sig); } -#pragma weak sigwait = _sigwait int -_sigwait(sigset_t *set) +sigwait(sigset_t *set) { - return (_sigtimedwait(set, NULL, NULL)); + return (sigtimedwait(set, NULL, NULL)); } -#pragma weak sigwaitinfo = _sigwaitinfo int -_sigwaitinfo(const sigset_t *set, siginfo_t *info) +sigwaitinfo(const sigset_t *set, siginfo_t *info) { - return (_sigtimedwait(set, info, NULL)); + return (sigtimedwait(set, info, NULL)); } -#pragma weak sigqueue = _sigqueue int -_sigqueue(pid_t pid, int signo, const union sigval value) +sigqueue(pid_t pid, int signo, const union sigval value) { extern int __sigqueue(pid_t pid, int signo, /* const union sigval */ void *value, int si_code, int block); @@ -1095,9 +1092,8 @@ _so_sendto(int sock, const void *buf, size_t len, int flags, PERFORM(__so_sendto(sock, buf, len, flags, addr, addrlen)) } -#pragma weak tcdrain = _tcdrain int -_tcdrain(int fildes) +tcdrain(int fildes) { extern int __tcdrain(int); int rv; @@ -1105,9 +1101,8 @@ _tcdrain(int fildes) PERFORM(__tcdrain(fildes)) } -#pragma weak waitid = _waitid int -_waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options) +waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options) { extern int __waitid(idtype_t, id_t, siginfo_t *, int); int rv; @@ -1117,9 +1112,8 @@ _waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options) PERFORM(__waitid(idtype, id, infop, options)) } -#pragma weak writev = _writev ssize_t -_writev(int fildes, const struct iovec *iov, int iovcnt) +writev(int fildes, const struct iovec *iov, int iovcnt) { extern ssize_t __writev(int, const struct iovec *, int); ssize_t rv; diff --git a/usr/src/lib/libc/port/threads/sema.c b/usr/src/lib/libc/port/threads/sema.c index 4e58123bd7..d0882fe75e 100644 --- a/usr/src/lib/libc/port/threads/sema.c +++ b/usr/src/lib/libc/port/threads/sema.c @@ -34,17 +34,17 @@ static uint32_t _semvaluemax; /* * Check to see if anyone is waiting for this semaphore. */ -#pragma weak sema_held = _sema_held +#pragma weak _sema_held = sema_held int -_sema_held(sema_t *sp) +sema_held(sema_t *sp) { return (sp->count == 0); } -#pragma weak sema_init = _sema_init -/* ARGSUSED2 */ +#pragma weak _sema_init = sema_init +/* ARGSUSED3 */ int -_sema_init(sema_t *sp, unsigned int count, int type, void *arg) +sema_init(sema_t *sp, unsigned int count, int type, void *arg) { if (_semvaluemax == 0) _semvaluemax = (uint32_t)_sysconf(_SC_SEM_VALUE_MAX); @@ -58,9 +58,9 @@ _sema_init(sema_t *sp, unsigned int count, int type, void *arg) return (0); } -#pragma weak sema_destroy = _sema_destroy +#pragma weak _sema_destroy = sema_destroy int -_sema_destroy(sema_t *sp) +sema_destroy(sema_t *sp) { sp->magic = 0; tdb_sync_obj_deregister(sp); @@ -186,17 +186,16 @@ sema_wait_impl(sema_t *sp, timespec_t *tsp) return (error); } -#pragma weak sema_wait = _sema_wait +#pragma weak _sema_wait = sema_wait int -_sema_wait(sema_t *sp) +sema_wait(sema_t *sp) { ASSERT(!curthread->ul_critical || curthread->ul_bindflags); return (sema_wait_impl(sp, NULL)); } -#pragma weak sema_reltimedwait = _sema_reltimedwait int -_sema_reltimedwait(sema_t *sp, timespec_t *reltime) +sema_reltimedwait(sema_t *sp, const timespec_t *reltime) { timespec_t tslocal = *reltime; @@ -204,9 +203,8 @@ _sema_reltimedwait(sema_t *sp, timespec_t *reltime) return (sema_wait_impl(sp, &tslocal)); } -#pragma weak sema_timedwait = _sema_timedwait int -_sema_timedwait(sema_t *sp, timespec_t *abstime) +sema_timedwait(sema_t *sp, const timespec_t *abstime) { timespec_t tslocal; @@ -215,9 +213,9 @@ _sema_timedwait(sema_t *sp, timespec_t *abstime) return (sema_wait_impl(sp, &tslocal)); } -#pragma weak sema_trywait = _sema_trywait +#pragma weak _sema_trywait = sema_trywait int -_sema_trywait(sema_t *sp) +sema_trywait(sema_t *sp) { lwp_sema_t *lsp = (lwp_sema_t *)sp; ulwp_t *self = curthread; @@ -232,7 +230,7 @@ _sema_trywait(sema_t *sp) tdb_incr(ssp->sema_trywait); if (lsp->type == USYNC_PROCESS) { /* kernel-level */ - error = __lwp_sema_trywait(lsp); + error = _lwp_sema_trywait(lsp); } else if (!udp->uberflags.uf_mt) { /* single threaded */ sigoff(self); if (lsp->count == 0) @@ -282,9 +280,9 @@ _sema_trywait(sema_t *sp) return (error); } -#pragma weak sema_post = _sema_post +#pragma weak _sema_post = sema_post int -_sema_post(sema_t *sp) +sema_post(sema_t *sp) { lwp_sema_t *lsp = (lwp_sema_t *)sp; ulwp_t *self = curthread; @@ -299,7 +297,7 @@ _sema_post(sema_t *sp) _semvaluemax = (uint32_t)_sysconf(_SC_SEM_VALUE_MAX); if (lsp->type == USYNC_PROCESS) { /* kernel-level */ - error = __lwp_sema_post(lsp); + error = _lwp_sema_post(lsp); } else if (!udp->uberflags.uf_mt) { /* single threaded */ sigoff(self); if (lsp->count >= _semvaluemax) diff --git a/usr/src/lib/libc/port/threads/sigaction.c b/usr/src/lib/libc/port/threads/sigaction.c index 4eb5ff659d..ccc9203ecd 100644 --- a/usr/src/lib/libc/port/threads/sigaction.c +++ b/usr/src/lib/libc/port/threads/sigaction.c @@ -27,14 +27,21 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include "lint.h" +#include <sys/feature_tests.h> +/* + * setcontext() really can return, if UC_CPU is not specified. + * Make the compiler shut up about it. + */ +#if defined(__NORETURN) +#undef __NORETURN +#endif +#define __NORETURN #include "thr_uberdata.h" #include "asyncio.h" #include <signal.h> #include <siginfo.h> #include <sys/systm.h> -extern int _setcontext(const ucontext_t *); - const sigset_t maskset = {MASKSET0, MASKSET1, 0, 0}; /* maskable signals */ /* @@ -171,10 +178,10 @@ call_user_handler(int sig, siginfo_t *sip, ucontext_t *ucp) * we are an aio worker thread, cancel the aio request. */ if (sig == SIGAIOCANCEL) { - aio_worker_t *aiowp = _pthread_getspecific(_aio_key); + aio_worker_t *aiowp = pthread_getspecific(_aio_key); if (sip != NULL && sip->si_code == SI_LWP && aiowp != NULL) - _siglongjmp(aiowp->work_jmp_buf, 1); + siglongjmp(aiowp->work_jmp_buf, 1); /* SIGLWP is ignored by default */ if (uact.sa_sigaction == SIG_DFL || uact.sa_sigaction == SIG_IGN) @@ -206,8 +213,8 @@ call_user_handler(int sig, siginfo_t *sip, ucontext_t *ucp) #endif /* sparc */ out: - (void) _setcontext(ucp); - thr_panic("call_user_handler(): _setcontext() returned"); + (void) setcontext(ucp); + thr_panic("call_user_handler(): setcontext() returned"); } /* @@ -327,7 +334,7 @@ sigacthandler(int sig, siginfo_t *sip, void *uvp) * Return to the previous context with all signals blocked. * We will restore the signal mask in take_deferred_signal(). * Note that we are calling the system call trap here, not - * the _setcontext() wrapper. We don't want to change the + * the setcontext() wrapper. We don't want to change the * thread's ul_sigmask by this operation. */ ucp->uc_sigmask = maskset; @@ -335,9 +342,9 @@ sigacthandler(int sig, siginfo_t *sip, void *uvp) thr_panic("sigacthandler(): __setcontext() returned"); } -#pragma weak sigaction = _sigaction +#pragma weak _sigaction = sigaction int -_sigaction(int sig, const struct sigaction *nact, struct sigaction *oact) +sigaction(int sig, const struct sigaction *nact, struct sigaction *oact) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -494,9 +501,9 @@ set_setcontext_enforcement(int on) setcontext_enforcement = on; } -#pragma weak setcontext = _setcontext +#pragma weak _setcontext = setcontext int -_setcontext(const ucontext_t *ucp) +setcontext(const ucontext_t *ucp) { ulwp_t *self = curthread; int ret; @@ -507,7 +514,7 @@ _setcontext(const ucontext_t *ucp) * the thread to exit. See setcontext(2) and makecontext(3C). */ if (ucp == NULL) - _thr_exit(NULL); + thr_exit(NULL); (void) memcpy(&uc, ucp, sizeof (uc)); /* @@ -566,11 +573,9 @@ _setcontext(const ucontext_t *ucp) return (ret); } -#pragma weak thr_sigsetmask = _thr_sigsetmask -#pragma weak pthread_sigmask = _thr_sigsetmask -#pragma weak _pthread_sigmask = _thr_sigsetmask +#pragma weak _thr_sigsetmask = thr_sigsetmask int -_thr_sigsetmask(int how, const sigset_t *set, sigset_t *oset) +thr_sigsetmask(int how, const sigset_t *set, sigset_t *oset) { ulwp_t *self = curthread; sigset_t saveset; @@ -620,9 +625,16 @@ _thr_sigsetmask(int how, const sigset_t *set, sigset_t *oset) return (0); } -#pragma weak sigprocmask = _sigprocmask +#pragma weak _pthread_sigmask = pthread_sigmask +int +pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) +{ + return (thr_sigsetmask(how, set, oset)); +} + +#pragma weak _sigprocmask = sigprocmask int -_sigprocmask(int how, const sigset_t *set, sigset_t *oset) +sigprocmask(int how, const sigset_t *set, sigset_t *oset) { int error; @@ -632,7 +644,7 @@ _sigprocmask(int how, const sigset_t *set, sigset_t *oset) if (curthread->ul_vfork) return (__lwp_sigmask(how, set, oset)); - if ((error = _thr_sigsetmask(how, set, oset)) != 0) { + if ((error = thr_sigsetmask(how, set, oset)) != 0) { errno = error; return (-1); } @@ -698,7 +710,7 @@ do_sigcancel(void) !self->ul_cancel_disabled && self->ul_libc_locks == 0 && !self->ul_cancelable) - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); set_cancel_pending_flag(self, 0); } diff --git a/usr/src/lib/libc/port/threads/spawn.c b/usr/src/lib/libc/port/threads/spawn.c index cf28f44b99..8743133b9c 100644 --- a/usr/src/lib/libc/port/threads/spawn.c +++ b/usr/src/lib/libc/port/threads/spawn.c @@ -65,8 +65,6 @@ typedef struct file_attr { int fa_newfiledes; /* new file descriptor for dup2() */ } file_attr_t; -extern pid_t _vforkx(int); -#pragma unknown_control_flow(_vforkx) extern int __lwp_sigmask(int, const sigset_t *, sigset_t *); extern int __sigaction(int, const struct sigaction *, struct sigaction *); @@ -185,13 +183,12 @@ get_error(int *errp) * (with a defunct owner) and we would deadlock ourself if we invoked it. * * Therefore, all of the functions we call here after returning from - * _vforkx() in the child are not and must never be exported from libc + * vforkx() in the child are not and must never be exported from libc * as global symbols. To do so would risk invoking the dynamic linker. */ -#pragma weak posix_spawn = _posix_spawn int -_posix_spawn( +posix_spawn( pid_t *pidp, const char *path, const posix_spawn_file_actions_t *file_actions, @@ -207,7 +204,7 @@ _posix_spawn( if (attrp != NULL && sap == NULL) return (EINVAL); - switch (pid = _vforkx(forkflags(sap))) { + switch (pid = vforkx(forkflags(sap))) { case 0: /* child */ break; case -1: /* parent, failure */ @@ -267,10 +264,9 @@ execat(const char *s1, const char *s2, char *si) return (*s1? ++s1: NULL); } -#pragma weak posix_spawnp = _posix_spawnp /* ARGSUSED */ int -_posix_spawnp( +posix_spawnp( pid_t *pidp, const char *file, const posix_spawn_file_actions_t *file_actions, @@ -309,7 +305,7 @@ _posix_spawnp( continue; newargs = alloca((argc + 2) * sizeof (char *)); - switch (pid = _vforkx(forkflags(sap))) { + switch (pid = vforkx(forkflags(sap))) { case 0: /* child */ break; case -1: /* parent, failure */ @@ -392,20 +388,16 @@ _posix_spawnp( return (0); /* not reached */ } -#pragma weak posix_spawn_file_actions_init = \ - _posix_spawn_file_actions_init int -_posix_spawn_file_actions_init( +posix_spawn_file_actions_init( posix_spawn_file_actions_t *file_actions) { file_actions->__file_attrp = NULL; return (0); } -#pragma weak posix_spawn_file_actions_destroy = \ - _posix_spawn_file_actions_destroy int -_posix_spawn_file_actions_destroy( +posix_spawn_file_actions_destroy( posix_spawn_file_actions_t *file_actions) { file_attr_t *froot = file_actions->__file_attrp; @@ -440,10 +432,8 @@ add_file_attr(posix_spawn_file_actions_t *file_actions, file_attr_t *fap) } } -#pragma weak posix_spawn_file_actions_addopen = \ - _posix_spawn_file_actions_addopen int -_posix_spawn_file_actions_addopen( +posix_spawn_file_actions_addopen( posix_spawn_file_actions_t *file_actions, int filedes, const char *path, @@ -473,10 +463,8 @@ _posix_spawn_file_actions_addopen( return (0); } -#pragma weak posix_spawn_file_actions_addclose = \ - _posix_spawn_file_actions_addclose int -_posix_spawn_file_actions_addclose( +posix_spawn_file_actions_addclose( posix_spawn_file_actions_t *file_actions, int filedes) { @@ -494,10 +482,8 @@ _posix_spawn_file_actions_addclose( return (0); } -#pragma weak posix_spawn_file_actions_adddup2 = \ - _posix_spawn_file_actions_adddup2 int -_posix_spawn_file_actions_adddup2( +posix_spawn_file_actions_adddup2( posix_spawn_file_actions_t *file_actions, int filedes, int newfiledes) @@ -517,10 +503,8 @@ _posix_spawn_file_actions_adddup2( return (0); } -#pragma weak posix_spawnattr_init = \ - _posix_spawnattr_init int -_posix_spawnattr_init( +posix_spawnattr_init( posix_spawnattr_t *attr) { if ((attr->__spawn_attrp = lmalloc(sizeof (posix_spawnattr_t))) == NULL) @@ -531,10 +515,8 @@ _posix_spawnattr_init( return (0); } -#pragma weak posix_spawnattr_destroy = \ - _posix_spawnattr_destroy int -_posix_spawnattr_destroy( +posix_spawnattr_destroy( posix_spawnattr_t *attr) { spawn_attr_t *sap = attr->__spawn_attrp; @@ -550,10 +532,8 @@ _posix_spawnattr_destroy( return (0); } -#pragma weak posix_spawnattr_setflags = \ - _posix_spawnattr_setflags int -_posix_spawnattr_setflags( +posix_spawnattr_setflags( posix_spawnattr_t *attr, short flags) { @@ -567,10 +547,8 @@ _posix_spawnattr_setflags( return (0); } -#pragma weak posix_spawnattr_getflags = \ - _posix_spawnattr_getflags int -_posix_spawnattr_getflags( +posix_spawnattr_getflags( const posix_spawnattr_t *attr, short *flags) { @@ -583,10 +561,8 @@ _posix_spawnattr_getflags( return (0); } -#pragma weak posix_spawnattr_setpgroup = \ - _posix_spawnattr_setpgroup int -_posix_spawnattr_setpgroup( +posix_spawnattr_setpgroup( posix_spawnattr_t *attr, pid_t pgroup) { @@ -599,10 +575,8 @@ _posix_spawnattr_setpgroup( return (0); } -#pragma weak posix_spawnattr_getpgroup = \ - _posix_spawnattr_getpgroup int -_posix_spawnattr_getpgroup( +posix_spawnattr_getpgroup( const posix_spawnattr_t *attr, pid_t *pgroup) { @@ -615,10 +589,8 @@ _posix_spawnattr_getpgroup( return (0); } -#pragma weak posix_spawnattr_setschedparam = \ - _posix_spawnattr_setschedparam int -_posix_spawnattr_setschedparam( +posix_spawnattr_setschedparam( posix_spawnattr_t *attr, const struct sched_param *schedparam) { @@ -634,10 +606,8 @@ _posix_spawnattr_setschedparam( return (0); } -#pragma weak posix_spawnattr_getschedparam = \ - _posix_spawnattr_getschedparam int -_posix_spawnattr_getschedparam( +posix_spawnattr_getschedparam( const posix_spawnattr_t *attr, struct sched_param *schedparam) { @@ -650,10 +620,8 @@ _posix_spawnattr_getschedparam( return (0); } -#pragma weak posix_spawnattr_setschedpolicy = \ - _posix_spawnattr_setschedpolicy int -_posix_spawnattr_setschedpolicy( +posix_spawnattr_setschedpolicy( posix_spawnattr_t *attr, int schedpolicy) { @@ -673,10 +641,8 @@ _posix_spawnattr_setschedpolicy( return (0); } -#pragma weak posix_spawnattr_getschedpolicy = \ - _posix_spawnattr_getschedpolicy int -_posix_spawnattr_getschedpolicy( +posix_spawnattr_getschedpolicy( const posix_spawnattr_t *attr, int *schedpolicy) { @@ -689,10 +655,8 @@ _posix_spawnattr_getschedpolicy( return (0); } -#pragma weak posix_spawnattr_setsigdefault = \ - _posix_spawnattr_setsigdefault int -_posix_spawnattr_setsigdefault( +posix_spawnattr_setsigdefault( posix_spawnattr_t *attr, const sigset_t *sigdefault) { @@ -705,10 +669,8 @@ _posix_spawnattr_setsigdefault( return (0); } -#pragma weak posix_spawnattr_getsigdefault = \ - _posix_spawnattr_getsigdefault int -_posix_spawnattr_getsigdefault( +posix_spawnattr_getsigdefault( const posix_spawnattr_t *attr, sigset_t *sigdefault) { @@ -721,10 +683,8 @@ _posix_spawnattr_getsigdefault( return (0); } -#pragma weak posix_spawnattr_setsigmask = \ - _posix_spawnattr_setsigmask int -_posix_spawnattr_setsigmask( +posix_spawnattr_setsigmask( posix_spawnattr_t *attr, const sigset_t *sigmask) { @@ -737,10 +697,8 @@ _posix_spawnattr_setsigmask( return (0); } -#pragma weak posix_spawnattr_getsigmask = \ - _posix_spawnattr_getsigmask int -_posix_spawnattr_getsigmask( +posix_spawnattr_getsigmask( const posix_spawnattr_t *attr, sigset_t *sigmask) { diff --git a/usr/src/lib/libc/port/threads/synch.c b/usr/src/lib/libc/port/threads/synch.c index 7bc1347e9a..83795070b6 100644 --- a/usr/src/lib/libc/port/threads/synch.c +++ b/usr/src/lib/libc/port/threads/synch.c @@ -26,8 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#define atomic_cas_64 _atomic_cas_64 - #include "lint.h" #include "thr_uberdata.h" #include <sys/rtpriocntl.h> @@ -125,11 +123,10 @@ int thread_queue_spin = 10000; * LOCK_PRIO_PROTECT * LOCK_ROBUST */ -#pragma weak mutex_init = __mutex_init -#pragma weak _mutex_init = __mutex_init +#pragma weak _mutex_init = mutex_init /* ARGSUSED2 */ int -__mutex_init(mutex_t *mp, int type, void *arg) +mutex_init(mutex_t *mp, int type, void *arg) { int basetype = (type & ~ALL_ATTRIBUTES); const pcclass_t *pccp; @@ -169,15 +166,14 @@ __mutex_init(mutex_t *mp, int type, void *arg) * atomic_or_16() to set the LOCK_INITED flag so as * not to disturb surrounding bits (LOCK_OWNERDEAD, etc). */ - extern void _atomic_or_16(volatile uint16_t *, uint16_t); if (!(mp->mutex_flag & LOCK_INITED)) { mp->mutex_type = (uint8_t)type; - _atomic_or_16(&mp->mutex_flag, LOCK_INITED); + atomic_or_16(&mp->mutex_flag, LOCK_INITED); mp->mutex_magic = MUTEX_MAGIC; } else if (type != mp->mutex_type || ((type & LOCK_PRIO_PROTECT) && mp->mutex_ceiling != ceil)) { error = EINVAL; - } else if (__mutex_consistent(mp) != 0) { + } else if (mutex_consistent(mp) != 0) { error = EBUSY; } /* register a process robust mutex with the kernel */ @@ -1107,19 +1103,16 @@ setup_schedctl(void) * Interfaces from libsched, incorporated into libc. * libsched.so.1 is now a filter library onto libc. */ -#pragma weak schedctl_lookup = _schedctl_init -#pragma weak _schedctl_lookup = _schedctl_init -#pragma weak schedctl_init = _schedctl_init +#pragma weak schedctl_lookup = schedctl_init schedctl_t * -_schedctl_init(void) +schedctl_init(void) { volatile sc_shared_t *scp = setup_schedctl(); return ((scp == NULL)? NULL : (schedctl_t *)&scp->sc_preemptctl); } -#pragma weak schedctl_exit = _schedctl_exit void -_schedctl_exit(void) +schedctl_exit(void) { } @@ -1820,7 +1813,7 @@ mutex_lock_queue(ulwp_t *self, tdb_mutex_stats_t *msp, mutex_t *mp, static int mutex_recursion(mutex_t *mp, int mtype, int try) { - ASSERT(mutex_is_held(mp)); + ASSERT(mutex_held(mp)); ASSERT(mtype & (LOCK_RECURSIVE|LOCK_ERRORCHECK)); ASSERT(try == MUTEX_TRY || try == MUTEX_LOCK); @@ -1859,12 +1852,12 @@ register_lock(mutex_t *mp) lmutex_lock(&udp->tdb_hash_lock); if ((table = udp->robustlocks) == NULL) { table = lmalloc(LOCKHASHSZ * sizeof (robust_t *)); - _membar_producer(); + membar_producer(); udp->robustlocks = table; } lmutex_unlock(&udp->tdb_hash_lock); } - _membar_consumer(); + membar_consumer(); /* * First search the registered table with no locks held. @@ -1898,7 +1891,7 @@ register_lock(mutex_t *mp) (void) ___lwp_mutex_register(mp); rlp = lmalloc(sizeof (*rlp)); rlp->robust_lock = mp; - _membar_producer(); + membar_producer(); *rlpp = rlp; lmutex_unlock(&udp->tdb_hash_lock); @@ -1956,11 +1949,11 @@ mutex_lock_internal(mutex_t *mp, timespec_t *tsp, int try) if (msp && try == MUTEX_TRY) tdb_incr(msp->mutex_try); - if ((mtype & (LOCK_RECURSIVE|LOCK_ERRORCHECK)) && mutex_is_held(mp)) + if ((mtype & (LOCK_RECURSIVE|LOCK_ERRORCHECK)) && mutex_held(mp)) return (mutex_recursion(mp, mtype, try)); if (self->ul_error_detection && try == MUTEX_LOCK && - tsp == NULL && mutex_is_held(mp)) + tsp == NULL && mutex_held(mp)) lock_error(mp, "mutex_lock", NULL, NULL); if ((mtype & LOCK_PRIO_PROTECT) && noceil == 0) { @@ -2166,53 +2159,48 @@ mutex_lock_impl(mutex_t *mp, timespec_t *tsp) return (mutex_lock_internal(mp, tsp, MUTEX_LOCK)); } -#pragma weak mutex_lock = __mutex_lock -#pragma weak _mutex_lock = __mutex_lock -#pragma weak pthread_mutex_lock = __mutex_lock -#pragma weak _pthread_mutex_lock = __mutex_lock +#pragma weak pthread_mutex_lock = mutex_lock +#pragma weak _mutex_lock = mutex_lock int -__mutex_lock(mutex_t *mp) +mutex_lock(mutex_t *mp) { ASSERT(!curthread->ul_critical || curthread->ul_bindflags); return (mutex_lock_impl(mp, NULL)); } -#pragma weak pthread_mutex_timedlock = _pthread_mutex_timedlock int -_pthread_mutex_timedlock(mutex_t *mp, const timespec_t *abstime) +pthread_mutex_timedlock(pthread_mutex_t *_RESTRICT_KYWD mp, + const struct timespec *_RESTRICT_KYWD abstime) { timespec_t tslocal; int error; ASSERT(!curthread->ul_critical || curthread->ul_bindflags); abstime_to_reltime(CLOCK_REALTIME, abstime, &tslocal); - error = mutex_lock_impl(mp, &tslocal); + error = mutex_lock_impl((mutex_t *)mp, &tslocal); if (error == ETIME) error = ETIMEDOUT; return (error); } -#pragma weak pthread_mutex_reltimedlock_np = _pthread_mutex_reltimedlock_np int -_pthread_mutex_reltimedlock_np(mutex_t *mp, const timespec_t *reltime) +pthread_mutex_reltimedlock_np(pthread_mutex_t *_RESTRICT_KYWD mp, + const struct timespec *_RESTRICT_KYWD reltime) { timespec_t tslocal; int error; ASSERT(!curthread->ul_critical || curthread->ul_bindflags); tslocal = *reltime; - error = mutex_lock_impl(mp, &tslocal); + error = mutex_lock_impl((mutex_t *)mp, &tslocal); if (error == ETIME) error = ETIMEDOUT; return (error); } -#pragma weak mutex_trylock = __mutex_trylock -#pragma weak _mutex_trylock = __mutex_trylock -#pragma weak pthread_mutex_trylock = __mutex_trylock -#pragma weak _pthread_mutex_trylock = __mutex_trylock +#pragma weak pthread_mutex_trylock = mutex_trylock int -__mutex_trylock(mutex_t *mp) +mutex_trylock(mutex_t *mp) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -2283,10 +2271,10 @@ mutex_unlock_internal(mutex_t *mp, int retain_robust_flags) int release_all; lwpid_t lwpid; - if ((mtype & LOCK_ERRORCHECK) && !mutex_is_held(mp)) + if ((mtype & LOCK_ERRORCHECK) && !mutex_held(mp)) return (EPERM); - if (self->ul_error_detection && !mutex_is_held(mp)) + if (self->ul_error_detection && !mutex_held(mp)) lock_error(mp, "mutex_unlock", NULL, NULL); if ((mtype & LOCK_RECURSIVE) && mp->mutex_rcount != 0) { @@ -2333,12 +2321,10 @@ mutex_unlock_internal(mutex_t *mp, int retain_robust_flags) return (error); } -#pragma weak mutex_unlock = __mutex_unlock -#pragma weak _mutex_unlock = __mutex_unlock -#pragma weak pthread_mutex_unlock = __mutex_unlock -#pragma weak _pthread_mutex_unlock = __mutex_unlock +#pragma weak pthread_mutex_unlock = mutex_unlock +#pragma weak _mutex_unlock = mutex_unlock int -__mutex_unlock(mutex_t *mp) +mutex_unlock(mutex_t *mp) { ulwp_t *self = curthread; int mtype = mp->mutex_type; @@ -2435,7 +2421,7 @@ slow_unlock: /* * Internally to the library, almost all mutex lock/unlock actions * go through these lmutex_ functions, to protect critical regions. - * We replicate a bit of code from __mutex_lock() and __mutex_unlock() + * We replicate a bit of code from mutex_lock() and mutex_unlock() * to make these functions faster since we know that the mutex type * of all internal locks is USYNC_THREAD. We also know that internal * locking can never fail, so we panic if it does. @@ -2626,7 +2612,7 @@ cancel_safe_mutex_unlock(mutex_t *mp) !(self->ul_vfork | self->ul_nocancel | self->ul_critical | self->ul_sigdefer) && cancel_active()) - _pthread_exit(PTHREAD_CANCELED); + pthread_exit(PTHREAD_CANCELED); } static int @@ -2652,18 +2638,9 @@ shared_mutex_held(mutex_t *mparg) return (MUTEX_OWNED(mp, self) && mp->mutex_ownerpid == udp->pid); } -/* - * Some crufty old programs define their own version of _mutex_held() - * to be simply return(1). This breaks internal libc logic, so we - * define a private version for exclusive use by libc, mutex_is_held(), - * and also a new public function, __mutex_held(), to be used in new - * code to circumvent these crufty old programs. - */ -#pragma weak mutex_held = mutex_is_held -#pragma weak _mutex_held = mutex_is_held -#pragma weak __mutex_held = mutex_is_held +#pragma weak _mutex_held = mutex_held int -mutex_is_held(mutex_t *mparg) +mutex_held(mutex_t *mparg) { volatile mutex_t *mp = (volatile mutex_t *)mparg; @@ -2672,12 +2649,10 @@ mutex_is_held(mutex_t *mparg) return (MUTEX_OWNED(mp, curthread)); } -#pragma weak mutex_destroy = __mutex_destroy -#pragma weak _mutex_destroy = __mutex_destroy -#pragma weak pthread_mutex_destroy = __mutex_destroy -#pragma weak _pthread_mutex_destroy = __mutex_destroy +#pragma weak pthread_mutex_destroy = mutex_destroy +#pragma weak _mutex_destroy = mutex_destroy int -__mutex_destroy(mutex_t *mp) +mutex_destroy(mutex_t *mp) { if (mp->mutex_type & USYNC_PROCESS) forget_lock(mp); @@ -2686,18 +2661,15 @@ __mutex_destroy(mutex_t *mp) return (0); } -#pragma weak mutex_consistent = __mutex_consistent -#pragma weak _mutex_consistent = __mutex_consistent -#pragma weak pthread_mutex_consistent_np = __mutex_consistent -#pragma weak _pthread_mutex_consistent_np = __mutex_consistent +#pragma weak pthread_mutex_consistent_np = mutex_consistent int -__mutex_consistent(mutex_t *mp) +mutex_consistent(mutex_t *mp) { /* * Do this only for an inconsistent, initialized robust lock * that we hold. For all other cases, return EINVAL. */ - if (mutex_is_held(mp) && + if (mutex_held(mp) && (mp->mutex_type & LOCK_ROBUST) && (mp->mutex_flag & LOCK_INITED) && (mp->mutex_flag & (LOCK_OWNERDEAD | LOCK_UNMAPPED))) { @@ -2713,9 +2685,8 @@ __mutex_consistent(mutex_t *mp) * but we use the same data structure for them. */ -#pragma weak pthread_spin_init = _pthread_spin_init int -_pthread_spin_init(pthread_spinlock_t *lock, int pshared) +pthread_spin_init(pthread_spinlock_t *lock, int pshared) { mutex_t *mp = (mutex_t *)lock; @@ -2729,17 +2700,15 @@ _pthread_spin_init(pthread_spinlock_t *lock, int pshared) return (0); } -#pragma weak pthread_spin_destroy = _pthread_spin_destroy int -_pthread_spin_destroy(pthread_spinlock_t *lock) +pthread_spin_destroy(pthread_spinlock_t *lock) { (void) memset(lock, 0, sizeof (*lock)); return (0); } -#pragma weak pthread_spin_trylock = _pthread_spin_trylock int -_pthread_spin_trylock(pthread_spinlock_t *lock) +pthread_spin_trylock(pthread_spinlock_t *lock) { mutex_t *mp = (mutex_t *)lock; ulwp_t *self = curthread; @@ -2758,9 +2727,8 @@ _pthread_spin_trylock(pthread_spinlock_t *lock) return (error); } -#pragma weak pthread_spin_lock = _pthread_spin_lock int -_pthread_spin_lock(pthread_spinlock_t *lock) +pthread_spin_lock(pthread_spinlock_t *lock) { mutex_t *mp = (mutex_t *)lock; ulwp_t *self = curthread; @@ -2797,9 +2765,8 @@ _pthread_spin_lock(pthread_spinlock_t *lock) return (0); } -#pragma weak pthread_spin_unlock = _pthread_spin_unlock int -_pthread_spin_unlock(pthread_spinlock_t *lock) +pthread_spin_unlock(pthread_spinlock_t *lock) { mutex_t *mp = (mutex_t *)lock; ulwp_t *self = curthread; @@ -2942,7 +2909,7 @@ heldlock_exit(void) * We avoid that case here. */ if ((mp = *lockptr) != NULL && - mutex_is_held(mp) && + mutex_held(mp) && (mp->mutex_type & (LOCK_ROBUST | LOCK_PRIO_INHERIT)) == LOCK_ROBUST) { mp->mutex_rcount = 0; @@ -2955,10 +2922,10 @@ heldlock_exit(void) heldlock_free(self); } -#pragma weak cond_init = _cond_init +#pragma weak _cond_init = cond_init /* ARGSUSED2 */ int -_cond_init(cond_t *cvp, int type, void *arg) +cond_init(cond_t *cvp, int type, void *arg) { if (type != USYNC_THREAD && type != USYNC_PROCESS) return (EINVAL); @@ -3091,7 +3058,7 @@ cond_sleep_queue(cond_t *cvp, mutex_t *mp, timespec_t *tsp) * then perform another cond_signal() to avoid consuming it. */ if (error && signalled) - (void) cond_signal_internal(cvp); + (void) cond_signal(cvp); return (error); } @@ -3213,7 +3180,7 @@ cond_wait_kernel(cond_t *cvp, mutex_t *mp, timespec_t *tsp) } /* - * Common code for _cond_wait() and _cond_timedwait() + * Common code for cond_wait() and cond_timedwait() */ int cond_wait_common(cond_t *cvp, mutex_t *mp, timespec_t *tsp) @@ -3261,7 +3228,7 @@ cond_wait_common(cond_t *cvp, mutex_t *mp, timespec_t *tsp) begin_sleep = gethrtime(); if (self->ul_error_detection) { - if (!mutex_is_held(mp)) + if (!mutex_held(mp)) lock_error(mp, "cond_wait", cvp, NULL); if ((mtype & LOCK_RECURSIVE) && mp->mutex_rcount != 0) lock_error(mp, "recursive mutex in cond_wait", @@ -3309,8 +3276,8 @@ cond_wait_common(cond_t *cvp, mutex_t *mp, timespec_t *tsp) } /* - * cond_wait() and _cond_wait() are cancellation points but __cond_wait() - * is not. Internally, libc calls the non-cancellation version. + * cond_wait() is a cancellation point but __cond_wait() is not. + * Internally, libc calls the non-cancellation version. * Other libraries need to use pthread_setcancelstate(), as appropriate, * since __cond_wait() is not exported from libc. */ @@ -3337,9 +3304,9 @@ __cond_wait(cond_t *cvp, mutex_t *mp) return (cond_wait_common(cvp, mp, NULL)); } -#pragma weak cond_wait = _cond_wait +#pragma weak _cond_wait = cond_wait int -_cond_wait(cond_t *cvp, mutex_t *mp) +cond_wait(cond_t *cvp, mutex_t *mp) { int error; @@ -3355,19 +3322,18 @@ _cond_wait(cond_t *cvp, mutex_t *mp) /* * pthread_cond_wait() is a cancellation point. */ -#pragma weak pthread_cond_wait = _pthread_cond_wait int -_pthread_cond_wait(cond_t *cvp, mutex_t *mp) +pthread_cond_wait(pthread_cond_t *_RESTRICT_KYWD cvp, + pthread_mutex_t *_RESTRICT_KYWD mp) { int error; - error = _cond_wait(cvp, mp); + error = cond_wait((cond_t *)cvp, (mutex_t *)mp); return ((error == EINTR)? 0 : error); } /* - * cond_timedwait() and _cond_timedwait() are cancellation points - * but __cond_timedwait() is not. + * cond_timedwait() is a cancellation point but __cond_timedwait() is not. */ int __cond_timedwait(cond_t *cvp, mutex_t *mp, const timespec_t *abstime) @@ -3394,9 +3360,8 @@ __cond_timedwait(cond_t *cvp, mutex_t *mp, const timespec_t *abstime) return (error); } -#pragma weak cond_timedwait = _cond_timedwait int -_cond_timedwait(cond_t *cvp, mutex_t *mp, const timespec_t *abstime) +cond_timedwait(cond_t *cvp, mutex_t *mp, const timespec_t *abstime) { int error; @@ -3412,13 +3377,14 @@ _cond_timedwait(cond_t *cvp, mutex_t *mp, const timespec_t *abstime) /* * pthread_cond_timedwait() is a cancellation point. */ -#pragma weak pthread_cond_timedwait = _pthread_cond_timedwait int -_pthread_cond_timedwait(cond_t *cvp, mutex_t *mp, const timespec_t *abstime) +pthread_cond_timedwait(pthread_cond_t *_RESTRICT_KYWD cvp, + pthread_mutex_t *_RESTRICT_KYWD mp, + const struct timespec *_RESTRICT_KYWD abstime) { int error; - error = _cond_timedwait(cvp, mp, abstime); + error = cond_timedwait((cond_t *)cvp, (mutex_t *)mp, abstime); if (error == ETIME) error = ETIMEDOUT; else if (error == EINTR) @@ -3427,8 +3393,7 @@ _pthread_cond_timedwait(cond_t *cvp, mutex_t *mp, const timespec_t *abstime) } /* - * cond_reltimedwait() and _cond_reltimedwait() are cancellation points - * but __cond_reltimedwait() is not. + * cond_reltimedwait() is a cancellation point but __cond_reltimedwait() is not. */ int __cond_reltimedwait(cond_t *cvp, mutex_t *mp, const timespec_t *reltime) @@ -3438,9 +3403,8 @@ __cond_reltimedwait(cond_t *cvp, mutex_t *mp, const timespec_t *reltime) return (cond_wait_common(cvp, mp, &tslocal)); } -#pragma weak cond_reltimedwait = _cond_reltimedwait int -_cond_reltimedwait(cond_t *cvp, mutex_t *mp, const timespec_t *reltime) +cond_reltimedwait(cond_t *cvp, mutex_t *mp, const timespec_t *reltime) { int error; @@ -3453,14 +3417,14 @@ _cond_reltimedwait(cond_t *cvp, mutex_t *mp, const timespec_t *reltime) return (error); } -#pragma weak pthread_cond_reltimedwait_np = _pthread_cond_reltimedwait_np int -_pthread_cond_reltimedwait_np(cond_t *cvp, mutex_t *mp, - const timespec_t *reltime) +pthread_cond_reltimedwait_np(pthread_cond_t *_RESTRICT_KYWD cvp, + pthread_mutex_t *_RESTRICT_KYWD mp, + const struct timespec *_RESTRICT_KYWD reltime) { int error; - error = _cond_reltimedwait(cvp, mp, reltime); + error = cond_reltimedwait((cond_t *)cvp, (mutex_t *)mp, reltime); if (error == ETIME) error = ETIMEDOUT; else if (error == EINTR) @@ -3468,12 +3432,10 @@ _pthread_cond_reltimedwait_np(cond_t *cvp, mutex_t *mp, return (error); } -#pragma weak pthread_cond_signal = cond_signal_internal -#pragma weak _pthread_cond_signal = cond_signal_internal -#pragma weak cond_signal = cond_signal_internal -#pragma weak _cond_signal = cond_signal_internal +#pragma weak pthread_cond_signal = cond_signal +#pragma weak _cond_signal = cond_signal int -cond_signal_internal(cond_t *cvp) +cond_signal(cond_t *cvp) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -3492,7 +3454,7 @@ cond_signal_internal(cond_t *cvp) tdb_incr(csp->cond_signal); if (cvp->cond_waiters_kernel) /* someone sleeping in the kernel? */ - error = __lwp_cond_signal(cvp); + error = _lwp_cond_signal(cvp); if (!cvp->cond_waiters_user) /* no one sleeping at user-level */ return (error); @@ -3601,12 +3563,10 @@ alloc_lwpids(lwpid_t *lwpid, int *nlwpid_ptr, int *maxlwps_ptr) return (lwpid); } -#pragma weak pthread_cond_broadcast = cond_broadcast_internal -#pragma weak _pthread_cond_broadcast = cond_broadcast_internal -#pragma weak cond_broadcast = cond_broadcast_internal -#pragma weak _cond_broadcast = cond_broadcast_internal +#pragma weak pthread_cond_broadcast = cond_broadcast +#pragma weak _cond_broadcast = cond_broadcast int -cond_broadcast_internal(cond_t *cvp) +cond_broadcast(cond_t *cvp) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -3627,7 +3587,7 @@ cond_broadcast_internal(cond_t *cvp) tdb_incr(csp->cond_broadcast); if (cvp->cond_waiters_kernel) /* someone sleeping in the kernel? */ - error = __lwp_cond_broadcast(cvp); + error = _lwp_cond_broadcast(cvp); if (!cvp->cond_waiters_user) /* no one sleeping at user-level */ return (error); @@ -3699,11 +3659,9 @@ cond_broadcast_internal(cond_t *cvp) return (error); } -#pragma weak pthread_cond_destroy = _cond_destroy -#pragma weak _pthread_cond_destroy = _cond_destroy -#pragma weak cond_destroy = _cond_destroy +#pragma weak pthread_cond_destroy = cond_destroy int -_cond_destroy(cond_t *cvp) +cond_destroy(cond_t *cvp) { cvp->cond_magic = 0; tdb_sync_obj_deregister(cvp); @@ -3745,9 +3703,6 @@ record_spin_locks(ulwp_t *ulwp) /* * atexit function: dump the queue statistics to stderr. */ -#if !defined(__lint) -#define fprintf _fprintf -#endif #include <stdio.h> void dump_queue_statistics(void) diff --git a/usr/src/lib/libc/port/threads/tdb_agent.c b/usr/src/lib/libc/port/threads/tdb_agent.c index 519fd4e439..919f0473f4 100644 --- a/usr/src/lib/libc/port/threads/tdb_agent.c +++ b/usr/src/lib/libc/port/threads/tdb_agent.c @@ -218,7 +218,7 @@ initialize_sync_hash() tdbp->tdb_register_count = 1; /* assign to tdb_sync_addr_hash only after fully initialized */ - _membar_producer(); + membar_producer(); tdbp->tdb_sync_addr_hash = addr_hash; lmutex_unlock(&udp->tdb_hash_lock); } @@ -269,7 +269,7 @@ tdb_sync_obj_register(void *addr, int *new) goto out; } } - _membar_consumer(); + membar_consumer(); sapp = &tdbp->tdb_sync_addr_hash[tdb_addr_hash(addr)]; if (udp->uberflags.uf_tdb_register_sync == REGISTER_SYNC_ON) { diff --git a/usr/src/lib/libc/port/threads/thr.c b/usr/src/lib/libc/port/threads/thr.c index 17625cb61c..2a23b6bd88 100644 --- a/usr/src/lib/libc/port/threads/thr.c +++ b/usr/src/lib/libc/port/threads/thr.c @@ -34,6 +34,17 @@ #include <ctype.h> #include "libc.h" +/* + * These symbols should not be exported from libc, but + * /lib/libm.so.2 references _thr_main. libm needs to be fixed. + * Also, some older versions of the Studio compiler/debugger + * components reference them. These need to be fixed, too. + */ +#pragma weak _thr_main = thr_main +#pragma weak _thr_create = thr_create +#pragma weak _thr_join = thr_join +#pragma weak _thr_self = thr_self + #undef errno extern int errno; @@ -243,7 +254,7 @@ dead_and_buried(ulwp_t *ulwp) if (ulwp->ul_lwpid == (lwpid_t)(-1)) return (1); if (ulwp->ul_dead && ulwp->ul_detached && - __lwp_kill(ulwp->ul_lwpid, 0) == ESRCH) { + _lwp_kill(ulwp->ul_lwpid, 0) == ESRCH) { ulwp->ul_lwpid = (lwpid_t)(-1); return (1); } @@ -512,7 +523,7 @@ ulwp_broadcast(ulwp_t *ulwp) uberdata_t *udp = self->ul_uberdata; ASSERT(MUTEX_OWNED(ulwp_mutex(ulwp, udp), self)); - (void) cond_broadcast_internal(ulwp_condvar(ulwp, udp)); + (void) cond_broadcast(ulwp_condvar(ulwp, udp)); } /* @@ -591,7 +602,7 @@ _thrp_create(void *stk, size_t stksize, void *(*func)(void *), void *arg, if (flags & THR_DAEMON) lwp_flags |= LWP_DAEMON; - /* creating a thread: enforce mt-correctness in _mutex_lock() */ + /* creating a thread: enforce mt-correctness in mutex_lock() */ self->ul_async_safe = 1; /* per-thread copies of global variables, for speed */ @@ -635,12 +646,12 @@ _thrp_create(void *stk, size_t stksize, void *(*func)(void *), void *arg, _fpinherit(ulwp); /* * Defer signals on the new thread until its TLS constructors - * have been called. _thr_setup() will call sigon() after + * have been called. _thrp_setup() will call sigon() after * it has called tls_setup(). */ ulwp->ul_sigdefer = 1; - if (setup_context(&uc, _thr_setup, ulwp, + if (setup_context(&uc, _thrp_setup, ulwp, (caddr_t)ulwp->ul_stk + ulwp->ul_guardsize, stksize) != 0) error = EAGAIN; @@ -702,9 +713,8 @@ _thrp_create(void *stk, size_t stksize, void *(*func)(void *), void *arg, return (0); } -#pragma weak thr_create = _thr_create int -_thr_create(void *stk, size_t stksize, void *(*func)(void *), void *arg, +thr_create(void *stk, size_t stksize, void *(*func)(void *), void *arg, long flags, thread_t *new_thread) { return (_thrp_create(stk, stksize, func, arg, flags, new_thread, 0)); @@ -714,7 +724,7 @@ _thr_create(void *stk, size_t stksize, void *(*func)(void *), void *arg, * A special cancellation cleanup hook for DCE. * cleanuphndlr, when it is not NULL, will contain a callback * function to be called before a thread is terminated in - * _thr_exit() as a result of being cancelled. + * thr_exit() as a result of being cancelled. */ static void (*cleanuphndlr)(void) = NULL; @@ -887,8 +897,8 @@ collect_queue_statistics() } #endif -void -_thr_exit_common(void *status, int unwind) +static void __NORETURN +_thrp_exit_common(void *status, int unwind) { ulwp_t *self = curthread; int cancelled = (self->ul_cancel_pending && status == PTHREAD_CANCELED); @@ -919,7 +929,7 @@ _thr_exit_common(void *status, int unwind) * bad behavior. Such signals will be lost to the process * when the thread finishes exiting. */ - (void) _thr_sigsetmask(SIG_SETMASK, &maskset, NULL); + (void) thr_sigsetmask(SIG_SETMASK, &maskset, NULL); sigoff(self); self->ul_rval = status; @@ -938,7 +948,10 @@ _thr_exit_common(void *status, int unwind) * It never returns. */ _thrp_unwind(NULL); - thr_panic("_thr_exit_common(): _thrp_unwind() returned"); + thr_panic("_thrp_exit_common(): _thrp_unwind() returned"); + + for (;;) /* to shut the compiler up about __NORETURN */ + continue; } /* @@ -946,18 +959,17 @@ _thr_exit_common(void *status, int unwind) * We are at the top of the stack; no unwinding is necessary. */ void -_thr_terminate(void *status) +_thrp_terminate(void *status) { - _thr_exit_common(status, 0); + _thrp_exit_common(status, 0); } -#pragma weak thr_exit = _thr_exit -#pragma weak pthread_exit = _thr_exit -#pragma weak _pthread_exit = _thr_exit +#pragma weak pthread_exit = thr_exit +#pragma weak _thr_exit = thr_exit void -_thr_exit(void *status) +thr_exit(void *status) { - _thr_exit_common(status, 1); + _thrp_exit_common(status, 1); } int @@ -1047,9 +1059,8 @@ _thrp_join(thread_t tid, thread_t *departed, void **status, int do_cancel) return (0); } -#pragma weak thr_join = _thr_join int -_thr_join(thread_t tid, thread_t *departed, void **status) +thr_join(thread_t tid, thread_t *departed, void **status) { int error = _thrp_join(tid, departed, status, 1); return ((error == EINVAL)? ESRCH : error); @@ -1061,17 +1072,15 @@ _thr_join(thread_t tid, thread_t *departed, void **status) * and hence does not have a "departed" argument. * It returns EINVAL if tid refers to a detached thread. */ -#pragma weak pthread_join = _pthread_join +#pragma weak _pthread_join = pthread_join int -_pthread_join(pthread_t tid, void **status) +pthread_join(pthread_t tid, void **status) { return ((tid == 0)? ESRCH : _thrp_join(tid, NULL, status, 1)); } -#pragma weak pthread_detach = _thr_detach -#pragma weak _pthread_detach = _thr_detach int -_thr_detach(thread_t tid) +pthread_detach(pthread_t tid) { uberdata_t *udp = curthread->ul_uberdata; ulwp_t *ulwp; @@ -1094,20 +1103,6 @@ _thr_detach(thread_t tid) return (error); } -/* - * Static local string compare function to avoid calling strncmp() - * (and hence the dynamic linker) during library initialization. - */ -static int -sncmp(const char *s1, const char *s2, size_t n) -{ - n++; - while (--n != 0 && *s1 == *s2++) - if (*s1++ == '\0') - return (0); - return (n == 0 ? 0 : *(uchar_t *)s1 - *(uchar_t *)--s2); -} - static const char * ematch(const char *ev, const char *match) { @@ -1184,18 +1179,18 @@ etest(const char *ev) static void set_thread_vars() { - extern const char **_environ; + extern const char **environ; const char **pev; const char *ev; char c; - if ((pev = _environ) == NULL) + if ((pev = environ) == NULL) return; while ((ev = *pev++) != NULL) { c = *ev; - if (c == '_' && sncmp(ev, "_THREAD_", 8) == 0) + if (c == '_' && strncmp(ev, "_THREAD_", 8) == 0) etest(ev + 8); - if (c == 'L' && sncmp(ev, "LIBTHREAD_", 10) == 0) + if (c == 'L' && strncmp(ev, "LIBTHREAD_", 10) == 0) etest(ev + 10); } } @@ -1314,7 +1309,7 @@ libc_init(void) self->ul_forw = self->ul_back = self; self->ul_hash = NULL; self->ul_ix = 0; - self->ul_lwpid = 1; /* __lwp_self() */ + self->ul_lwpid = 1; /* _lwp_self() */ self->ul_main = 1; self->ul_self = self; self->ul_policy = -1; /* initialize only when needed */ @@ -1603,7 +1598,7 @@ postfork1_child() __libc_threaded = 0; for (i = 0; i < udp->hash_size; i++) udp->thr_hash_table[i].hash_bucket = NULL; - self->ul_lwpid = __lwp_self(); + self->ul_lwpid = _lwp_self(); hash_in_unlocked(self, TIDHASH(self->ul_lwpid, udp), udp); /* @@ -1611,8 +1606,10 @@ postfork1_child() * while holding udp->callout_lock or udp->ld_lock. * Reinitialize the child's copies. */ - mutex_init(&udp->callout_lock, USYNC_THREAD | LOCK_RECURSIVE, NULL); - mutex_init(&udp->ld_lock, USYNC_THREAD | LOCK_RECURSIVE, NULL); + (void) mutex_init(&udp->callout_lock, + USYNC_THREAD | LOCK_RECURSIVE, NULL); + (void) mutex_init(&udp->ld_lock, + USYNC_THREAD | LOCK_RECURSIVE, NULL); /* no one in the child is on a sleep queue; reinitialize */ if ((qp = udp->queue_head) != NULL) { @@ -1692,19 +1689,16 @@ lwp_self(void) return (curthread->ul_lwpid); } -#pragma weak _ti_thr_self = _thr_self -#pragma weak thr_self = _thr_self -#pragma weak pthread_self = _thr_self -#pragma weak _pthread_self = _thr_self +#pragma weak _ti_thr_self = thr_self +#pragma weak pthread_self = thr_self thread_t -_thr_self() +thr_self() { return (curthread->ul_lwpid); } -#pragma weak thr_main = _thr_main int -_thr_main() +thr_main() { ulwp_t *self = __curthread(); @@ -1726,9 +1720,9 @@ _thrp_stksegment(ulwp_t *ulwp, stack_t *stk) return (0); } -#pragma weak thr_stksegment = _thr_stksegment +#pragma weak _thr_stksegment = thr_stksegment int -_thr_stksegment(stack_t *stk) +thr_stksegment(stack_t *stk) { return (_thrp_stksegment(curthread, stk)); } @@ -1747,7 +1741,7 @@ force_continue(ulwp_t *ulwp) ASSERT(MUTEX_OWNED(ulwp_mutex(ulwp, udp), self)); for (;;) { - error = __lwp_continue(ulwp->ul_lwpid); + error = _lwp_continue(ulwp->ul_lwpid); if (error != 0 && error != EINTR) break; error = 0; @@ -1869,7 +1863,7 @@ top: } } - (void) cond_broadcast_internal(cvp); + (void) cond_broadcast(cvp); lmutex_unlock(mp); return (error); } @@ -2099,36 +2093,32 @@ _thrp_continue(thread_t tid, uchar_t whystopped) return (error); } -#pragma weak thr_suspend = _thr_suspend int -_thr_suspend(thread_t tid) +thr_suspend(thread_t tid) { return (_thrp_suspend(tid, TSTP_REGULAR)); } -#pragma weak thr_continue = _thr_continue int -_thr_continue(thread_t tid) +thr_continue(thread_t tid) { return (_thrp_continue(tid, TSTP_REGULAR)); } -#pragma weak thr_yield = _thr_yield void -_thr_yield() +thr_yield() { yield(); } -#pragma weak thr_kill = _thr_kill -#pragma weak pthread_kill = _thr_kill -#pragma weak _pthread_kill = _thr_kill +#pragma weak pthread_kill = thr_kill +#pragma weak _thr_kill = thr_kill int -_thr_kill(thread_t tid, int sig) +thr_kill(thread_t tid, int sig) { if (sig == SIGCANCEL) return (EINVAL); - return (__lwp_kill(tid, sig)); + return (_lwp_kill(tid, sig)); } /* @@ -2200,7 +2190,7 @@ _ti_bind_guard(int flags) if ((flags & (THR_FLG_NOLOCK | THR_FLG_REENTER)) == THR_FLG_NOLOCK) { ASSERT(self->ul_critical == 0); sigoff(self); /* see no signals while holding ld_lock */ - mutex_lock(&udp->ld_lock); + (void) mutex_lock(&udp->ld_lock); } enter_critical(self); self->ul_save_state = self->ul_cancel_disabled; @@ -2226,7 +2216,7 @@ _ti_bind_clear(int flags) if ((flags & (THR_FLG_NOLOCK | THR_FLG_REENTER)) == THR_FLG_NOLOCK) { ASSERT(self->ul_critical == 0); if (MUTEX_OWNED(&udp->ld_lock, self)) { - mutex_unlock(&udp->ld_lock); + (void) mutex_unlock(&udp->ld_lock); sigon(self); /* reenable signals */ } } @@ -2237,7 +2227,7 @@ _ti_bind_clear(int flags) * sigoff() and sigon() enable cond_wait() to behave (optionally) like * it does in the old libthread (see the comments in cond_wait_queue()). * Also, signals are deferred at thread startup until TLS constructors - * have all been called, at which time _thr_setup() calls sigon(). + * have all been called, at which time _thrp_setup() calls sigon(). * * _sigoff() and _sigon() are external consolidation-private interfaces to * sigoff() and sigon(), respectively, in libc. These are used in libnsl. @@ -2272,23 +2262,20 @@ sigon(ulwp_t *self) } } -#pragma weak thr_getconcurrency = _thr_getconcurrency int -_thr_getconcurrency() +thr_getconcurrency() { return (thr_concurrency); } -#pragma weak pthread_getconcurrency = _pthread_getconcurrency int -_pthread_getconcurrency() +pthread_getconcurrency() { return (pthread_concurrency); } -#pragma weak thr_setconcurrency = _thr_setconcurrency int -_thr_setconcurrency(int new_level) +thr_setconcurrency(int new_level) { uberdata_t *udp = curthread->ul_uberdata; @@ -2303,9 +2290,8 @@ _thr_setconcurrency(int new_level) return (0); } -#pragma weak pthread_setconcurrency = _pthread_setconcurrency int -_pthread_setconcurrency(int new_level) +pthread_setconcurrency(int new_level) { if (new_level < 0) return (EINVAL); @@ -2315,10 +2301,8 @@ _pthread_setconcurrency(int new_level) return (0); } -#pragma weak thr_min_stack = _thr_min_stack -#pragma weak __pthread_min_stack = _thr_min_stack size_t -_thr_min_stack(void) +thr_min_stack(void) { return (MINSTACK); } @@ -2346,9 +2330,9 @@ cond_t mutatorscv = DEFAULTCV; /* where non-mutators sleep. */ * Get the available register state for the target thread. * Return non-volatile registers: TRS_NONVOLATILE */ -#pragma weak thr_getstate = _thr_getstate +#pragma weak _thr_getstate = thr_getstate int -_thr_getstate(thread_t tid, int *flag, lwpid_t *lwp, stack_t *ss, gregset_t rs) +thr_getstate(thread_t tid, int *flag, lwpid_t *lwp, stack_t *ss, gregset_t rs) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -2393,9 +2377,9 @@ _thr_getstate(thread_t tid, int *flag, lwpid_t *lwp, stack_t *ss, gregset_t rs) * Set the appropriate register state for the target thread. * This is not used by java. It exists solely for the MSTC test suite. */ -#pragma weak thr_setstate = _thr_setstate +#pragma weak _thr_setstate = thr_setstate int -_thr_setstate(thread_t tid, int flag, gregset_t rs) +thr_setstate(thread_t tid, int flag, gregset_t rs) { uberdata_t *udp = curthread->ul_uberdata; ulwp_t *ulwp; @@ -2524,9 +2508,9 @@ __gettsp(thread_t tid) * This tells java stack walkers how to find the ucontext * structure passed to signal handlers. */ -#pragma weak thr_sighndlrinfo = _thr_sighndlrinfo +#pragma weak _thr_sighndlrinfo = thr_sighndlrinfo void -_thr_sighndlrinfo(void (**func)(), int *funcsize) +thr_sighndlrinfo(void (**func)(), int *funcsize) { *func = &__sighndlr; *funcsize = (char *)&__sighndlrend - (char *)&__sighndlr; @@ -2536,9 +2520,9 @@ _thr_sighndlrinfo(void (**func)(), int *funcsize) * Mark a thread a mutator or reset a mutator to being a default, * non-mutator thread. */ -#pragma weak thr_setmutator = _thr_setmutator +#pragma weak _thr_setmutator = thr_setmutator int -_thr_setmutator(thread_t tid, int enabled) +thr_setmutator(thread_t tid, int enabled) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -2566,11 +2550,11 @@ top: lmutex_lock(&mutatorslock); if (mutatorsbarrier) { ulwp_unlock(ulwp, udp); - (void) _pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, + (void) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state); while (mutatorsbarrier) - (void) _cond_wait(&mutatorscv, &mutatorslock); - (void) _pthread_setcancelstate(cancel_state, NULL); + (void) cond_wait(&mutatorscv, &mutatorslock); + (void) pthread_setcancelstate(cancel_state, NULL); lmutex_unlock(&mutatorslock); goto top; } @@ -2586,9 +2570,9 @@ top: * Establish a barrier against new mutators. Any non-mutator trying * to become a mutator is suspended until the barrier is removed. */ -#pragma weak thr_mutators_barrier = _thr_mutators_barrier +#pragma weak _thr_mutators_barrier = thr_mutators_barrier void -_thr_mutators_barrier(int enabled) +thr_mutators_barrier(int enabled) { int oldvalue; int cancel_state; @@ -2598,10 +2582,10 @@ _thr_mutators_barrier(int enabled) /* * Wait if trying to set the barrier while it is already set. */ - (void) _pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state); + (void) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state); while (mutatorsbarrier && enabled) - (void) _cond_wait(&mutatorscv, &mutatorslock); - (void) _pthread_setcancelstate(cancel_state, NULL); + (void) cond_wait(&mutatorscv, &mutatorslock); + (void) pthread_setcancelstate(cancel_state, NULL); oldvalue = mutatorsbarrier; mutatorsbarrier = enabled; @@ -2609,7 +2593,7 @@ _thr_mutators_barrier(int enabled) * Wakeup any blocked non-mutators when barrier is removed. */ if (oldvalue && !enabled) - (void) cond_broadcast_internal(&mutatorscv); + (void) cond_broadcast(&mutatorscv); lmutex_unlock(&mutatorslock); } @@ -2619,9 +2603,9 @@ _thr_mutators_barrier(int enabled) * in this list are suspended. Actively running non-mutators remain * running. Any other thread is suspended. */ -#pragma weak thr_suspend_allmutators = _thr_suspend_allmutators +#pragma weak _thr_suspend_allmutators = thr_suspend_allmutators int -_thr_suspend_allmutators(void) +thr_suspend_allmutators(void) { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -2678,9 +2662,9 @@ top: * suspended mutator, whether suspended by thr_suspend_mutator(), or by * thr_suspend_allmutators(), can be resumed by thr_continue_mutator(). */ -#pragma weak thr_suspend_mutator = _thr_suspend_mutator +#pragma weak _thr_suspend_mutator = thr_suspend_mutator int -_thr_suspend_mutator(thread_t tid) +thr_suspend_mutator(thread_t tid) { if (tid == 0) tid = curthread->ul_lwpid; @@ -2690,9 +2674,9 @@ _thr_suspend_mutator(thread_t tid) /* * Resume the set of all suspended mutators. */ -#pragma weak thr_continue_allmutators = _thr_continue_allmutators +#pragma weak _thr_continue_allmutators = thr_continue_allmutators int -_thr_continue_allmutators() +thr_continue_allmutators() { ulwp_t *self = curthread; uberdata_t *udp = self->ul_uberdata; @@ -2731,26 +2715,26 @@ _thr_continue_allmutators() /* * Resume a suspended mutator. */ -#pragma weak thr_continue_mutator = _thr_continue_mutator +#pragma weak _thr_continue_mutator = thr_continue_mutator int -_thr_continue_mutator(thread_t tid) +thr_continue_mutator(thread_t tid) { return (_thrp_continue(tid, TSTP_MUTATOR)); } -#pragma weak thr_wait_mutator = _thr_wait_mutator +#pragma weak _thr_wait_mutator = thr_wait_mutator int -_thr_wait_mutator(thread_t tid, int dontwait) +thr_wait_mutator(thread_t tid, int dontwait) { uberdata_t *udp = curthread->ul_uberdata; ulwp_t *ulwp; int cancel_state; int error = 0; - (void) _pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state); + (void) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state); top: if ((ulwp = find_lwp(tid)) == NULL) { - (void) _pthread_setcancelstate(cancel_state, NULL); + (void) pthread_setcancelstate(cancel_state, NULL); return (ESRCH); } @@ -2763,13 +2747,13 @@ top: cond_t *cvp = ulwp_condvar(ulwp, udp); mutex_t *mp = ulwp_mutex(ulwp, udp); - (void) _cond_wait(cvp, mp); + (void) cond_wait(cvp, mp); (void) lmutex_unlock(mp); goto top; } ulwp_unlock(ulwp, udp); - (void) _pthread_setcancelstate(cancel_state, NULL); + (void) pthread_setcancelstate(cancel_state, NULL); return (error); } diff --git a/usr/src/lib/libc/port/threads/tls.c b/usr/src/lib/libc/port/threads/tls.c index 5225f11205..12704cdc4f 100644 --- a/usr/src/lib/libc/port/threads/tls.c +++ b/usr/src/lib/libc/port/threads/tls.c @@ -312,7 +312,7 @@ __tls_get_addr(TLS_index *tls_index) #endif /* TLS_GET_ADDR_IS_WRITTEN_IN_ASSEMBLER */ /* - * This is called by _thr_setup() to initialize the thread's static TLS. + * This is called by _thrp_setup() to initialize the thread's static TLS. * Constructors for initially allocated static TLS are called here. */ void diff --git a/usr/src/lib/libc/port/threads/tsd.c b/usr/src/lib/libc/port/threads/tsd.c index bd11c43a7f..290aa22352 100644 --- a/usr/src/lib/libc/port/threads/tsd.c +++ b/usr/src/lib/libc/port/threads/tsd.c @@ -31,17 +31,24 @@ #include <stddef.h> /* + * These symbols should not be exported from libc, but + * /lib/libm.so.2 references them. libm needs to be fixed. + * Also, some older versions of the Studio compiler/debugger + * components reference them. These need to be fixed, too. + */ +#pragma weak _thr_getspecific = thr_getspecific +#pragma weak _thr_keycreate = thr_keycreate +#pragma weak _thr_setspecific = thr_setspecific + +/* * 128 million keys should be enough for anyone. * This allocates half a gigabyte of memory for the keys themselves and * half a gigabyte of memory for each thread that uses the largest key. */ #define MAX_KEYS 0x08000000U -#pragma weak thr_keycreate = _thr_keycreate -#pragma weak pthread_key_create = _thr_keycreate -#pragma weak _pthread_key_create = _thr_keycreate int -_thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)) +thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)) { tsd_metadata_t *tsdm = &curthread->ul_uberdata->tsd_metadata; void (**old_data)(void *) = NULL; @@ -128,8 +135,15 @@ _thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)) return (0); } +#pragma weak _pthread_key_create = pthread_key_create +int +pthread_key_create(pthread_key_t *pkey, void (*destructor)(void *)) +{ + return (thr_keycreate(pkey, destructor)); +} + /* - * Same as _thr_keycreate(), above, except that the key creation + * Same as thr_keycreate(), above, except that the key creation * is performed only once. This relies upon the fact that a key * value of THR_ONCE_KEY is invalid, and requires that the key be * allocated with a value of THR_ONCE_KEY before calling here. @@ -141,11 +155,9 @@ _thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)) * ... * pthread_key_create_once_np(&key, destructor); */ -#pragma weak pthread_key_create_once_np = _thr_keycreate_once -#pragma weak _pthread_key_create_once_np = _thr_keycreate_once -#pragma weak thr_keycreate_once = _thr_keycreate_once +#pragma weak pthread_key_create_once_np = thr_keycreate_once int -_thr_keycreate_once(thread_key_t *keyp, void (*destructor)(void *)) +thr_keycreate_once(thread_key_t *keyp, void (*destructor)(void *)) { static mutex_t key_lock = DEFAULTMUTEX; thread_key_t key; @@ -154,25 +166,23 @@ _thr_keycreate_once(thread_key_t *keyp, void (*destructor)(void *)) if (*keyp == THR_ONCE_KEY) { lmutex_lock(&key_lock); if (*keyp == THR_ONCE_KEY) { - error = _thr_keycreate(&key, destructor); + error = thr_keycreate(&key, destructor); if (error) { lmutex_unlock(&key_lock); return (error); } - _membar_producer(); + membar_producer(); *keyp = key; } lmutex_unlock(&key_lock); } - _membar_consumer(); + membar_consumer(); return (0); } -#pragma weak pthread_key_delete = _thr_key_delete -#pragma weak _pthread_key_delete = _thr_key_delete int -_thr_key_delete(thread_key_t key) +pthread_key_delete(pthread_key_t key) { tsd_metadata_t *tsdm = &curthread->ul_uberdata->tsd_metadata; @@ -200,9 +210,8 @@ _thr_key_delete(thread_key_t key) * incurred by thr_getspecific(). Every once in a while, the Standards * get it right -- but usually by accident. */ -#pragma weak pthread_getspecific = _pthread_getspecific void * -_pthread_getspecific(pthread_key_t key) +pthread_getspecific(pthread_key_t key) { tsd_t *stsd; @@ -223,9 +232,8 @@ _pthread_getspecific(pthread_key_t key) return (NULL); } -#pragma weak thr_getspecific = _thr_getspecific int -_thr_getspecific(thread_key_t key, void **valuep) +thr_getspecific(thread_key_t key, void **valuep) { tsd_t *stsd; @@ -250,13 +258,13 @@ _thr_getspecific(thread_key_t key, void **valuep) } /* - * We call _thr_setspecific_slow() when the key specified + * We call thr_setspecific_slow() when the key specified * is beyond the current thread's currently allocated range. * This case is in a separate function because we want * the compiler to optimize for the common case. */ static int -_thr_setspecific_slow(thread_key_t key, void *value) +thr_setspecific_slow(thread_key_t key, void *value) { ulwp_t *self = curthread; tsd_metadata_t *tsdm = &self->ul_uberdata->tsd_metadata; @@ -310,18 +318,15 @@ _thr_setspecific_slow(thread_key_t key, void *value) return (0); } -#pragma weak thr_setspecific = _thr_setspecific -#pragma weak pthread_setspecific = _thr_setspecific -#pragma weak _pthread_setspecific = _thr_setspecific int -_thr_setspecific(thread_key_t key, void *value) +thr_setspecific(thread_key_t key, void *value) { tsd_t *stsd; int ret; ulwp_t *self = curthread; /* - * See the comment in _thr_getspecific(), above. + * See the comment in thr_getspecific(), above. */ if (key == 0) return (EINVAL); @@ -341,11 +346,17 @@ _thr_setspecific(thread_key_t key, void *value) * allocation and free. Similar protection required in tsd_free(). */ enter_critical(self); - ret = _thr_setspecific_slow(key, value); + ret = thr_setspecific_slow(key, value); exit_critical(self); return (ret); } +int +pthread_setspecific(pthread_key_t key, const void *value) +{ + return (thr_setspecific(key, (void *)value)); +} + /* * Contract-private interface for java. See PSARC/2003/159 * diff --git a/usr/src/lib/libc/port/tpool/thread_pool.c b/usr/src/lib/libc/port/tpool/thread_pool.c index 5042f60301..7ab97cd633 100644 --- a/usr/src/lib/libc/port/tpool/thread_pool.c +++ b/usr/src/lib/libc/port/tpool/thread_pool.c @@ -20,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <stdlib.h> #include <signal.h> @@ -287,7 +287,7 @@ tpool_create(uint_t min_threads, uint_t max_threads, uint_t linger, * If the attribute pointer is NULL, we need to initialize * the new pthread_attr_t structure with default values. */ - error = _pthread_attr_clone(&tpool->tp_attr, attr); + error = pthread_attr_clone(&tpool->tp_attr, attr); if (error) { lfree(tpool, sizeof (*tpool)); errno = error; @@ -297,7 +297,7 @@ tpool_create(uint_t min_threads, uint_t max_threads, uint_t linger, /* make all pool threads be detached daemon threads */ (void) pthread_attr_setdetachstate(&tpool->tp_attr, PTHREAD_CREATE_DETACHED); - (void) _pthread_attr_setdaemonstate_np(&tpool->tp_attr, + (void) pthread_attr_setdaemonstate_np(&tpool->tp_attr, PTHREAD_CREATE_DAEMON_NP); /* insert into the global list of all thread pools */ diff --git a/usr/src/lib/libc/port/tpool/thread_pool_impl.h b/usr/src/lib/libc/port/tpool/thread_pool_impl.h index 66611778a0..f7e045eef4 100644 --- a/usr/src/lib/libc/port/tpool/thread_pool_impl.h +++ b/usr/src/lib/libc/port/tpool/thread_pool_impl.h @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -88,7 +88,7 @@ struct tpool { #define TP_DESTROY 0x04 /* pool is being destroyed */ #define TP_ABANDON 0x08 /* pool is abandoned (auto-destroy) */ -extern int _pthread_attr_clone(pthread_attr_t *, const pthread_attr_t *); +extern int pthread_attr_clone(pthread_attr_t *, const pthread_attr_t *); extern const sigset_t maskset; /* set of all maskable signals */ diff --git a/usr/src/lib/libc/port/unwind/unwind.c b/usr/src/lib/libc/port/unwind/unwind.c index 9e31d656c1..2a7f0ccc0f 100644 --- a/usr/src/lib/libc/port/unwind/unwind.c +++ b/usr/src/lib/libc/port/unwind/unwind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,13 @@ */ /* - * Copyright 2006 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" -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <dlfcn.h> @@ -57,7 +56,7 @@ extern void _ex_unwind_local(void); * _thrp_unwind: first arg = current fp; * jump _t_cancel; * - * We could have called _t_cancel(_getfp) from _thr_exit() + * We could have called _t_cancel(_getfp) from thr_exit() * but _ex_unwind() also calls _t_cancel() and it does after * poping out the two frames. If _ex_unwind() passes the current * fp, then it will be invalid. For a caller of _thrp_unwind() diff --git a/usr/src/lib/libc/sparc/Makefile b/usr/src/lib/libc/sparc/Makefile index 5080553482..337b5ec720 100644 --- a/usr/src/lib/libc/sparc/Makefile +++ b/usr/src/lib/libc/sparc/Makefile @@ -131,8 +131,6 @@ GENOBJS= \ errlst.o \ getctxt.o \ ladd.o \ - lexp10.o \ - llog10.o \ lmul.o \ lock.o \ lshiftl.o \ @@ -508,11 +506,13 @@ PORTGEN= \ lckpwdf.o \ lconstants.o \ ldivide.o \ + lexp10.o \ lfind.o \ lfmt.o \ lfmt_log.o \ llabs.o \ lldiv.o \ + llog10.o \ lltostr.o \ localtime.o \ lsearch.o \ @@ -1067,8 +1067,6 @@ SRCS= \ $(LIBCBASE)/gen/byteorder.c \ $(LIBCBASE)/gen/ecvt.c \ $(LIBCBASE)/gen/getctxt.c \ - $(LIBCBASE)/gen/lexp10.c \ - $(LIBCBASE)/gen/llog10.c \ $(LIBCBASE)/gen/lmul.c \ $(LIBCBASE)/gen/makectxt.c \ $(LIBCBASE)/gen/siginfolst.c \ diff --git a/usr/src/lib/libc/sparc/crt/_ftou.c b/usr/src/lib/libc/sparc/crt/_ftou.c index 8f960205f3..bfc4802836 100644 --- a/usr/src/lib/libc/sparc/crt/_ftou.c +++ b/usr/src/lib/libc/sparc/crt/_ftou.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include "libc.h" diff --git a/usr/src/lib/libc/sparc/crt/_rtld.c b/usr/src/lib/libc/sparc/crt/_rtld.c index 596ce619e1..50647dd10c 100644 --- a/usr/src/lib/libc/sparc/crt/_rtld.c +++ b/usr/src/lib/libc/sparc/crt/_rtld.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +34,7 @@ /* * Import data structures */ -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/mman.h> #include <sys/fcntl.h> @@ -284,7 +284,7 @@ __rtld(Elf32_Boot *ebp, const char *strings[], int (*funcs[])()) */ if (pptr->p_memsz > pptr->p_filesz) { foff = (uintptr_t)faddr + pptr->p_vaddr + - pptr->p_filesz; + pptr->p_filesz; zaddr = (caddr_t)ROUND(foff, page_size); for (j = 0; j < (int)(zaddr - foff); j++) *((char *)foff + j) = 0; diff --git a/usr/src/lib/libc/sparc/fp/_Q_get_rp_rd.s b/usr/src/lib/libc/sparc/fp/_Q_get_rp_rd.s index e62cfcdc08..a1a5e560ad 100644 --- a/usr/src/lib/libc/sparc/fp/_Q_get_rp_rd.s +++ b/usr/src/lib/libc/sparc/fp/_Q_get_rp_rd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" + .file "%M%" + #include <sys/asm_linkage.h> ENTRY(_QgetRD) diff --git a/usr/src/lib/libc/sparc/fp/_Q_set_except.c b/usr/src/lib/libc/sparc/fp/_Q_set_except.c index 42a0419c01..a55818bbb2 100644 --- a/usr/src/lib/libc/sparc/fp/_Q_set_except.c +++ b/usr/src/lib/libc/sparc/fp/_Q_set_except.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/ieeefp.h> #include <ieeefp.h> diff --git a/usr/src/lib/libc/sparc/fp/fpgetmask.s b/usr/src/lib/libc/sparc/fp/fpgetmask.s index 6a41d8db88..a75d946234 100644 --- a/usr/src/lib/libc/sparc/fp/fpgetmask.s +++ b/usr/src/lib/libc/sparc/fp/fpgetmask.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpgetmask.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpgetmask,function) -#include "synonyms.h" - ENTRY(fpgetmask) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x0f800000, %o4 ! mask of trap enable bits diff --git a/usr/src/lib/libc/sparc/fp/fpgetrnd.s b/usr/src/lib/libc/sparc/fp/fpgetrnd.s index 6293fa74c3..2c2d044f79 100644 --- a/usr/src/lib/libc/sparc/fp/fpgetrnd.s +++ b/usr/src/lib/libc/sparc/fp/fpgetrnd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpgetrnd.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpgetround,function) -#include "synonyms.h" - ENTRY(fpgetround) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage st %fsr, [%sp+ARGPUSH] ! get fsr value diff --git a/usr/src/lib/libc/sparc/fp/fpgetsticky.s b/usr/src/lib/libc/sparc/fp/fpgetsticky.s index 8f7890973b..bd274719d3 100644 --- a/usr/src/lib/libc/sparc/fp/fpgetsticky.s +++ b/usr/src/lib/libc/sparc/fp/fpgetsticky.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpgetsticky.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpgetsticky,function) -#include "synonyms.h" - ENTRY(fpgetsticky) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x000003e0, %o4 ! mask of accrued exception bits diff --git a/usr/src/lib/libc/sparc/fp/fpsetmask.s b/usr/src/lib/libc/sparc/fp/fpsetmask.s index 9732d6a85c..2277a0b536 100644 --- a/usr/src/lib/libc/sparc/fp/fpsetmask.s +++ b/usr/src/lib/libc/sparc/fp/fpsetmask.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,18 @@ * * CDDL HEADER END */ + +/* + * 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" -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ - -.ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 1.4.1.9 */ + .file "%M%" /* * fp_except fpsetmask(mask) @@ -37,14 +40,10 @@ * is cleared */ - .file "fpsetmask.s" - -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpsetmask,function) -#include "synonyms.h" - ENTRY(fpsetmask) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x0f800000, %o4 ! mask of trap enable bits diff --git a/usr/src/lib/libc/sparc/fp/fpsetrnd.s b/usr/src/lib/libc/sparc/fp/fpsetrnd.s index 6178aeb4f4..f668e7b7be 100644 --- a/usr/src/lib/libc/sparc/fp/fpsetrnd.s +++ b/usr/src/lib/libc/sparc/fp/fpsetrnd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5.1.9 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpsetrnd.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpsetround,function) -#include "synonyms.h" - ENTRY(fpsetround) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0xc0000000, %o4 ! mask of round control bits diff --git a/usr/src/lib/libc/sparc/fp/fpsetsticky.s b/usr/src/lib/libc/sparc/fp/fpsetsticky.s index 1ce9b3c8a3..792fc0402a 100644 --- a/usr/src/lib/libc/sparc/fp/fpsetsticky.s +++ b/usr/src/lib/libc/sparc/fp/fpsetsticky.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 1.4.1.7 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpsetsticky.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpsetsticky,function) -#include "synonyms.h" - ENTRY(fpsetsticky) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x000003e0, %o4 ! mask of accrued exception bits diff --git a/usr/src/lib/libc/sparc/gen/_stack_grow.s b/usr/src/lib/libc/sparc/gen/_stack_grow.s index 293769fd68..07376f21bc 100644 --- a/usr/src/lib/libc/sparc/gen/_stack_grow.s +++ b/usr/src/lib/libc/sparc/gen/_stack_grow.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,7 +28,6 @@ .file "%M%" -#include <sys/asm_linkage.h> #include "SYS.h" #include <../assym.h> diff --git a/usr/src/lib/libc/sparc/gen/_xregs_clrptr.c b/usr/src/lib/libc/sparc/gen/_xregs_clrptr.c index 9be916fec2..4124b55a4c 100644 --- a/usr/src/lib/libc/sparc/gen/_xregs_clrptr.c +++ b/usr/src/lib/libc/sparc/gen/_xregs_clrptr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <ucontext.h> #include <sys/types.h> #include "libc.h" diff --git a/usr/src/lib/libc/sparc/gen/ecvt.c b/usr/src/lib/libc/sparc/gen/ecvt.c index 18807b1eca..0bee1fac69 100644 --- a/usr/src/lib/libc/sparc/gen/ecvt.c +++ b/usr/src/lib/libc/sparc/gen/ecvt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * ecvt converts to decimal @@ -37,13 +36,11 @@ * sign is set to 0 for positive, 1 for negative * */ -#pragma weak ecvt = _ecvt -#pragma weak fcvt = _fcvt -#pragma weak qecvt = _qecvt -#pragma weak qfcvt = _qfcvt -#pragma weak qgcvt = _qgcvt -#include "synonyms.h" +#pragma weak _ecvt = ecvt +#pragma weak _fcvt = fcvt + +#include "lint.h" #include <sys/types.h> #include <stdlib.h> #include <floatingpoint.h> diff --git a/usr/src/lib/libc/sparc/gen/getctxt.c b/usr/src/lib/libc/sparc/gen/getctxt.c index b119860217..3213955108 100644 --- a/usr/src/lib/libc/sparc/gen/getctxt.c +++ b/usr/src/lib/libc/sparc/gen/getctxt.c @@ -29,9 +29,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getcontext = _getcontext +#pragma weak _getcontext = getcontext -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <ucontext.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/sparc/gen/ladd.s b/usr/src/lib/libc/sparc/gen/ladd.s index a5ddacc329..a3bf215c56 100644 --- a/usr/src/lib/libc/sparc/gen/ladd.s +++ b/usr/src/lib/libc/sparc/gen/ladd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,18 @@ * * CDDL HEADER END */ + +/* + * 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" -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ - -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ + .file "%M%" /* * Double long add routine. Ported from pdp 11/70 version @@ -39,13 +43,7 @@ * dl_t rop; */ - .file "ladd.s" - -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(ladd,function) - -#include "synonyms.h" +#include "SYS.h" ENTRY(ladd) diff --git a/usr/src/lib/libc/sparc/gen/lmul.c b/usr/src/lib/libc/sparc/gen/lmul.c index 7f6aa0f079..27ea35168f 100644 --- a/usr/src/lib/libc/sparc/gen/lmul.c +++ b/usr/src/lib/libc/sparc/gen/lmul.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,20 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak lmul = _lmul - -#include "synonyms.h" +#include "lint.h" #include "sys/types.h" #include "sys/dl.h" diff --git a/usr/src/lib/libc/sparc/gen/lshiftl.s b/usr/src/lib/libc/sparc/gen/lshiftl.s index 820c91f8ea..dd1a475d22 100644 --- a/usr/src/lib/libc/sparc/gen/lshiftl.s +++ b/usr/src/lib/libc/sparc/gen/lshiftl.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,18 @@ * * CDDL HEADER END */ + +/* + * 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" -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ - -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ + .file "%M%" /* * Shift a double long value. Ported from m32 version to sparc. @@ -36,14 +40,7 @@ * int cnt; */ - .file "lshiftl.s" - -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(lshiftl,function) - -#include "synonyms.h" - +#include "SYS.h" ENTRY(lshiftl) diff --git a/usr/src/lib/libc/sparc/gen/lsign.s b/usr/src/lib/libc/sparc/gen/lsign.s index 1269fbe551..6d774b582c 100644 --- a/usr/src/lib/libc/sparc/gen/lsign.s +++ b/usr/src/lib/libc/sparc/gen/lsign.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,18 @@ * * CDDL HEADER END */ + +/* + * 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" -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ - -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ + .file "%M%" /* * Determine the sign of a double-long number. @@ -36,13 +40,7 @@ * dl_t op; */ - .file "lsign.s" - -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(lsign,function) - -#include "synonyms.h" +#include "SYS.h" ENTRY(lsign) diff --git a/usr/src/lib/libc/sparc/gen/lsub.s b/usr/src/lib/libc/sparc/gen/lsub.s index e6457b9abe..90bbccab99 100644 --- a/usr/src/lib/libc/sparc/gen/lsub.s +++ b/usr/src/lib/libc/sparc/gen/lsub.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,18 @@ * * CDDL HEADER END */ + +/* + * 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" -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ - -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ + .file "%M%" /* * Double long subtraction routine. Ported from pdp 11/70 version @@ -38,13 +42,7 @@ * dl_t rop; */ - .file "lsub.s" - -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(lsub,function) - -#include "synonyms.h" +#include "SYS.h" ENTRY(lsub) diff --git a/usr/src/lib/libc/sparc/gen/makectxt.c b/usr/src/lib/libc/sparc/gen/makectxt.c index 9dc4c64697..7519bdabcb 100644 --- a/usr/src/lib/libc/sparc/gen/makectxt.c +++ b/usr/src/lib/libc/sparc/gen/makectxt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak makecontext = _makecontext -#pragma weak __makecontext_v2 = ___makecontext_v2 +#pragma weak _makecontext = makecontext +#pragma weak ___makecontext_v2 = __makecontext_v2 -#include "synonyms.h" +#include "lint.h" #include <stdarg.h> #include <strings.h> #include <sys/ucontext.h> @@ -53,7 +52,7 @@ static void resumecontext(void); void -_makecontext(ucontext_t *ucp, void (*func)(), int argc, ...) +makecontext(ucontext_t *ucp, void (*func)(), int argc, ...) { greg_t *reg; long *tsp; diff --git a/usr/src/lib/libc/sparc/gen/memchr.s b/usr/src/lib/libc/sparc/gen/memchr.s index 0f38ad2c77..5688826dde 100644 --- a/usr/src/lib/libc/sparc/gen/memchr.s +++ b/usr/src/lib/libc/sparc/gen/memchr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" - .file "%M%" /* * Return the ptr in sptr at which the character c1 appears; * or NULL if not found in n chars; don't stop at \0. @@ -47,7 +48,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! The first part of this algorithm focuses on determining ! whether or not the desired character is in the first few bytes diff --git a/usr/src/lib/libc/sparc/gen/memcmp.s b/usr/src/lib/libc/sparc/gen/memcmp.s index 1ba5cc454b..be2fe4e24b 100644 --- a/usr/src/lib/libc/sparc/gen/memcmp.s +++ b/usr/src/lib/libc/sparc/gen/memcmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1989-1995,1998 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" /* SunOS 4.1 1.2 */ +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -55,8 +55,6 @@ ANSI_PRAGMA_WEAK(memcmp,function) -#include "synonyms.h" - ENTRY(memcmp) st %g2, [%sp + 68] ! g2 must be restored before retl cmp %o0, %o1 ! s1 == s2? diff --git a/usr/src/lib/libc/sparc/gen/memcpy.s b/usr/src/lib/libc/sparc/gen/memcpy.s index 2587108195..32589b5655 100644 --- a/usr/src/lib/libc/sparc/gen/memcpy.s +++ b/usr/src/lib/libc/sparc/gen/memcpy.s @@ -24,7 +24,7 @@ * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -51,12 +51,10 @@ * } */ -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(memcpy,function) -#include "synonyms.h" - ENTRY(memcpy) st %o0, [%sp + 68] ! save des address for return val cmp %o2, 17 ! for small counts copy bytes diff --git a/usr/src/lib/libc/sparc/gen/memmove.s b/usr/src/lib/libc/sparc/gen/memmove.s index e57650f6ab..122c191555 100644 --- a/usr/src/lib/libc/sparc/gen/memmove.s +++ b/usr/src/lib/libc/sparc/gen/memmove.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1987-1995, by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -32,8 +32,6 @@ ANSI_PRAGMA_WEAK(memmove,function) -#include "synonyms.h" - /* * memmove(s1, s2, len) * Copy s2 to s1, always copy n bytes. diff --git a/usr/src/lib/libc/sparc/gen/memset.s b/usr/src/lib/libc/sparc/gen/memset.s index 7dd7d51961..750ee3bd2b 100644 --- a/usr/src/lib/libc/sparc/gen/memset.s +++ b/usr/src/lib/libc/sparc/gen/memset.s @@ -24,7 +24,7 @@ * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -54,8 +54,6 @@ ANSI_PRAGMA_WEAK(memset,function) -#include "synonyms.h" - ENTRY(memset) mov %o0, %o5 ! copy sp before using it cmp %o2, 7 ! if small counts, just write bytes diff --git a/usr/src/lib/libc/sparc/gen/setjmp.s b/usr/src/lib/libc/sparc/gen/setjmp.s index 264e9be602..c491eb26e4 100644 --- a/usr/src/lib/libc/sparc/gen/setjmp.s +++ b/usr/src/lib/libc/sparc/gen/setjmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,24 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 1987-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" - .file "setjmp.s" + .file "%M%" #include <sys/asm_linkage.h> ANSI_PRAGMA_WEAK(setjmp,function) ANSI_PRAGMA_WEAK(longjmp,function) -#include "synonyms.h" - #include <sys/trap.h> JB_FLAGS = (0*4) ! offsets in jmpbuf (see siglonglmp.c) diff --git a/usr/src/lib/libc/sparc/gen/siginfolst.c b/usr/src/lib/libc/sparc/gen/siginfolst.c index 8939850c60..712e70c582 100644 --- a/usr/src/lib/libc/sparc/gen/siginfolst.c +++ b/usr/src/lib/libc/sparc/gen/siginfolst.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <signal.h> #include <siginfo.h> diff --git a/usr/src/lib/libc/sparc/gen/siglongjmp.c b/usr/src/lib/libc/sparc/gen/siglongjmp.c index 5efc2e28a2..83a640397d 100644 --- a/usr/src/lib/libc/sparc/gen/siglongjmp.c +++ b/usr/src/lib/libc/sparc/gen/siglongjmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,19 +20,18 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak siglongjmp = _siglongjmp +#pragma weak _siglongjmp = siglongjmp -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/stack.h> #include <sys/frame.h> diff --git a/usr/src/lib/libc/sparc/gen/strcasecmp.s b/usr/src/lib/libc/sparc/gen/strcasecmp.s index 8efc518ab4..2ef09e2ca6 100644 --- a/usr/src/lib/libc/sparc/gen/strcasecmp.s +++ b/usr/src/lib/libc/sparc/gen/strcasecmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" /* @@ -116,9 +116,7 @@ * Both algorithms have been tested exhaustively for all possible 2^32 inputs. */ - #include <sys/asm_linkage.h> -#include "synonyms.h" ! The first part of this algorithm walks through the beginning of ! both strings a byte at a time until the source ptr is aligned to diff --git a/usr/src/lib/libc/sparc/gen/strchr.s b/usr/src/lib/libc/sparc/gen/strchr.s index 6a7ee9008b..b2e8d660de 100644 --- a/usr/src/lib/libc/sparc/gen/strchr.s +++ b/usr/src/lib/libc/sparc/gen/strchr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -35,7 +35,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! Here, we start by checking to see if we're searching the dest ! string for a null byte. We have fast code for this, so it's diff --git a/usr/src/lib/libc/sparc/gen/strcmp.s b/usr/src/lib/libc/sparc/gen/strcmp.s index a1b7065a04..ce402f07da 100644 --- a/usr/src/lib/libc/sparc/gen/strcmp.s +++ b/usr/src/lib/libc/sparc/gen/strcmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -51,7 +51,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! This strcmp implementation first determines whether s1 is aligned. ! If it is not, it attempts to align it and then checks the diff --git a/usr/src/lib/libc/sparc/gen/strcpy.s b/usr/src/lib/libc/sparc/gen/strcpy.s index 63de6cfe8c..593a4e8293 100644 --- a/usr/src/lib/libc/sparc/gen/strcpy.s +++ b/usr/src/lib/libc/sparc/gen/strcpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -51,7 +51,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! This is a 32-bit implementation of strcpy. It works by ! first checking the alignment of its source pointer. And, diff --git a/usr/src/lib/libc/sparc/gen/strlcpy.s b/usr/src/lib/libc/sparc/gen/strlcpy.s index 0dd5366dd3..9e96232e22 100644 --- a/usr/src/lib/libc/sparc/gen/strlcpy.s +++ b/usr/src/lib/libc/sparc/gen/strlcpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" /* @@ -39,7 +39,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! strlcpy implementation is similar to that of strcpy, except ! in this case, the maximum size of the detination must be diff --git a/usr/src/lib/libc/sparc/gen/strlen.s b/usr/src/lib/libc/sparc/gen/strlen.s index 09da4ed196..e709690f79 100644 --- a/usr/src/lib/libc/sparc/gen/strlen.s +++ b/usr/src/lib/libc/sparc/gen/strlen.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -50,7 +49,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! The object of strlen is to, as quickly as possible, find the ! null byte. To this end, we attempt to get our string aligned diff --git a/usr/src/lib/libc/sparc/gen/strncmp.s b/usr/src/lib/libc/sparc/gen/strncmp.s index 2d9c138ce0..109c52362f 100644 --- a/usr/src/lib/libc/sparc/gen/strncmp.s +++ b/usr/src/lib/libc/sparc/gen/strncmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,17 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1989,1998 by Sun Microsystems, Inc. - * All rights reserved. - * - * .seg "data" - * .asciz "@(#)strncmp.s 1.2 89/08/16" + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" /* SunOS 4.1 1.4 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "strncmp.s" + .file "%M%" /* * strncmp(s1, s2, n) @@ -53,7 +50,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ENTRY(strncmp) save %sp, -SA(WINDOWSIZE), %sp diff --git a/usr/src/lib/libc/sparc/gen/strncpy.s b/usr/src/lib/libc/sparc/gen/strncpy.s index 11afb2ac4b..e6cb8046e7 100644 --- a/usr/src/lib/libc/sparc/gen/strncpy.s +++ b/usr/src/lib/libc/sparc/gen/strncpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -54,7 +53,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! strncpy works similarly to strcpy, except that n bytes of s2 ! are copied to s1. If a null character is reached in s2 yet more diff --git a/usr/src/lib/libc/sparc/gen/swapctxt.c b/usr/src/lib/libc/sparc/gen/swapctxt.c index 8c052ca843..c2b527e868 100644 --- a/usr/src/lib/libc/sparc/gen/swapctxt.c +++ b/usr/src/lib/libc/sparc/gen/swapctxt.c @@ -29,9 +29,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak swapcontext = _swapcontext +#pragma weak _swapcontext = swapcontext -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <ucontext.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/sparc/inc/SYS.h b/usr/src/lib/libc/sparc/inc/SYS.h index 7a0f619a72..25a2a9b898 100644 --- a/usr/src/lib/libc/sparc/inc/SYS.h +++ b/usr/src/lib/libc/sparc/inc/SYS.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +39,6 @@ #include <sys/asm_linkage.h> #include <sys/syscall.h> #include <sys/errno.h> -#include "synonyms.h" /* * While it's tempting to imagine we could use 'rd %pc' here, diff --git a/usr/src/lib/libc/sparc/mapfile-vers b/usr/src/lib/libc/sparc/mapfile-vers index 3c08ffb4b7..443284364e 100644 --- a/usr/src/lib/libc/sparc/mapfile-vers +++ b/usr/src/lib/libc/sparc/mapfile-vers @@ -40,7 +40,6 @@ SUNW_1.23 { enable_extended_FILE_stdio; lio_listio64; mkstemps64; - _mkstemps64; posix_fallocate64; }; @@ -941,6 +940,7 @@ SUNWprivate_1.1 { __lshrdi3; _memcmp = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; _memcpy = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; + _memcpy = NODYNSORT; _memmove = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; _memset = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; __moddi3; diff --git a/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s b/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s index 79dfca3c39..62a0a82b8c 100644 --- a/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s +++ b/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s @@ -26,14 +26,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" - .file "%M%" - -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(_lwp_mutex_unlock,function) + .file "%M%" #include "SYS.h" -#include <sys/synch32.h> #include <../assym.h> ENTRY(_lwp_mutex_unlock) diff --git a/usr/src/lib/libc/sparc/sys/door.s b/usr/src/lib/libc/sparc/sys/door.s index 19059ef056..b7fb6abce2 100644 --- a/usr/src/lib/libc/sparc/sys/door.s +++ b/usr/src/lib/libc/sparc/sys/door.s @@ -28,27 +28,18 @@ .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" +#include <sys/door.h> /* * weak aliases for public interfaces */ - ANSI_PRAGMA_WEAK(_door_bind,function) - ANSI_PRAGMA_WEAK(_door_getparam,function) - ANSI_PRAGMA_WEAK(_door_info,function) - ANSI_PRAGMA_WEAK(_door_revoke,function) - ANSI_PRAGMA_WEAK(_door_setparam,function) - ANSI_PRAGMA_WEAK(_door_unbind,function) - - ANSI_PRAGMA_WEAK(door_bind,function) - ANSI_PRAGMA_WEAK(door_getparam,function) - ANSI_PRAGMA_WEAK(door_info,function) - ANSI_PRAGMA_WEAK(door_revoke,function) - ANSI_PRAGMA_WEAK(door_setparam,function) - ANSI_PRAGMA_WEAK(door_unbind,function) - -#include <sys/door.h> -#include "SYS.h" + ANSI_PRAGMA_WEAK2(door_bind,__door_bind,function) + ANSI_PRAGMA_WEAK2(door_getparam,__door_getparam,function) + ANSI_PRAGMA_WEAK2(door_info,__door_info,function) + ANSI_PRAGMA_WEAK2(door_revoke,__door_revoke,function) + ANSI_PRAGMA_WEAK2(door_setparam,__door_setparam,function) + ANSI_PRAGMA_WEAK2(door_unbind,__door_unbind,function) /* * Offsets within struct door_results @@ -138,7 +129,7 @@ door_restart: ldn [%sp + DOOR_DESC_SIZE], %o4 /* Exit the thread if we return here */ - call _thr_terminate + call _thrp_terminate mov %g0, %o0 /* NOTREACHED */ 2: diff --git a/usr/src/lib/libc/sparc/sys/gettimeofday.s b/usr/src/lib/libc/sparc/sys/gettimeofday.s index 23984f57ee..dedd12fd7b 100644 --- a/usr/src/lib/libc/sparc/sys/gettimeofday.s +++ b/usr/src/lib/libc/sparc/sys/gettimeofday.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" .file "%M%" @@ -37,12 +36,10 @@ * int gettimeofday (struct timeval *tp); */ -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(gettimeofday,function) -#include "SYS.h" - /* * The interface below calls the trap (0x27) to get the timestamp in * secs and nsecs. It than converts the nsecs value into usecs before @@ -63,7 +60,7 @@ * */ - ENTRY(_gettimeofday) + ENTRY(gettimeofday) brz,pn %o0, 1f mov %o0, %o5 SYSFASTTRAP(GETHRESTIME) @@ -74,4 +71,4 @@ srlx %o2, 38, %o2 stn %o2, [%o5 + CLONGSIZE] 1: RETC - SET_SIZE(_gettimeofday) + SET_SIZE(gettimeofday) diff --git a/usr/src/lib/libc/sparc/sys/ptrace.c b/usr/src/lib/libc/sparc/sys/ptrace.c index 68c923489e..7610586c3f 100644 --- a/usr/src/lib/libc/sparc/sys/ptrace.c +++ b/usr/src/lib/libc/sparc/sys/ptrace.c @@ -30,9 +30,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak ptrace = _ptrace +#pragma weak _ptrace = ptrace -#include "synonyms.h" +#include "lint.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/usr/src/lib/libc/sparc/sys/syscall.s b/usr/src/lib/libc/sparc/sys/syscall.s index ab4fa8020f..f90ee2c92e 100644 --- a/usr/src/lib/libc/sparc/sys/syscall.s +++ b/usr/src/lib/libc/sparc/sys/syscall.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2004 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" /* @@ -48,16 +47,11 @@ .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(syscall,function) - #include "SYS.h" -#undef _syscall /* override "synonyms.h" */ -#undef __systemcall + ANSI_PRAGMA_WEAK(syscall,function) - ENTRY(_syscall) + ENTRY(syscall) save %sp, -SA(MINFRAME + 2*CLONGSIZE), %sp ldn [%fp + STACK_BIAS + MINFRAME], %o5 ! arg 5 mov %i3, %o2 ! arg 2 @@ -79,7 +73,7 @@ 1: ret restore - SET_SIZE(_syscall) + SET_SIZE(syscall) /* * Same as _syscall(), but restricted to 6 syscall arguments diff --git a/usr/src/lib/libc/sparc/sys/vforkx.s b/usr/src/lib/libc/sparc/sys/vforkx.s index d5e41b571a..2757668e6b 100644 --- a/usr/src/lib/libc/sparc/sys/vforkx.s +++ b/usr/src/lib/libc/sparc/sys/vforkx.s @@ -19,23 +19,18 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(vforkx,function) - ANSI_PRAGMA_WEAK(vfork,function) - #include "SYS.h" #include <assym.h> diff --git a/usr/src/lib/libc/sparc/threads/asm_subr.s b/usr/src/lib/libc/sparc/threads/asm_subr.s index f2fbb6adab..29489eb44e 100644 --- a/usr/src/lib/libc/sparc/threads/asm_subr.s +++ b/usr/src/lib/libc/sparc/threads/asm_subr.s @@ -26,20 +26,19 @@ #pragma ident "%Z%%M% %I% %E% SMI" - .file "asm_subr.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" #include <sys/trap.h> #include <../assym.h> -#include "SYS.h" ! This is where execution resumes when a thread created with ! thr_create() or pthread_create() returns (see setup_context()). - ! We pass the (void *) return value to _thr_terminate(). + ! We pass the (void *) return value to _thrp_terminate(). ENTRY(_lwp_start) nop ! this is the location from which the func() was "called" nop - call _thr_terminate ! %o0 contains the return value + call _thrp_terminate ! %o0 contains the return value nop SET_SIZE(_lwp_start) diff --git a/usr/src/lib/libc/sparc/threads/machdep.c b/usr/src/lib/libc/sparc/threads/machdep.c index c5510f776f..a1704c0418 100644 --- a/usr/src/lib/libc/sparc/threads/machdep.c +++ b/usr/src/lib/libc/sparc/threads/machdep.c @@ -67,7 +67,7 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *), * Machine-dependent startup code for a newly-created thread. */ void * -_thr_setup(ulwp_t *self) +_thrp_setup(ulwp_t *self) { extern void _setfsr(greg_t *); diff --git a/usr/src/lib/libc/sparc/threads/tls_get_addr.s b/usr/src/lib/libc/sparc/threads/tls_get_addr.s index 9e88bde010..dc4051b7ab 100644 --- a/usr/src/lib/libc/sparc/threads/tls_get_addr.s +++ b/usr/src/lib/libc/sparc/threads/tls_get_addr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,10 +28,8 @@ .file "%M%" -#include <sys/asm_linkage.h> -#include <sys/trap.h> -#include <../assym.h> #include "SYS.h" +#include <../assym.h> /* * To make thread-local storage accesses as fast as possible, we diff --git a/usr/src/lib/libc/sparcv9/Makefile b/usr/src/lib/libc/sparcv9/Makefile index 9155de7910..9f7c8d7ef1 100644 --- a/usr/src/lib/libc/sparcv9/Makefile +++ b/usr/src/lib/libc/sparcv9/Makefile @@ -130,8 +130,6 @@ GENOBJS= \ cuexit.o \ ecvt.o \ getctxt.o \ - lexp10.o \ - llog10.o \ lock.o \ makectxt.o \ memchr.o \ @@ -469,10 +467,12 @@ PORTGEN= \ lckpwdf.o \ lconstants.o \ ldivide.o \ + lexp10.o \ lfind.o \ lfmt.o \ lfmt_log.o \ lldiv.o \ + llog10.o \ lltostr.o \ lmath.o \ localtime.o \ @@ -1000,8 +1000,6 @@ SRCS= \ $(LIBCBASE)/gen/byteorder.c \ $(LIBCBASE)/gen/ecvt.c \ $(LIBCBASE)/gen/getctxt.c \ - $(LIBCBASE)/gen/lexp10.c \ - $(LIBCBASE)/gen/llog10.c \ $(LIBCBASE)/gen/makectxt.c \ $(LIBCBASE)/gen/siginfolst.c \ $(LIBCBASE)/gen/siglongjmp.c \ diff --git a/usr/src/lib/libc/sparcv9/crt/__align_cpy_2.s b/usr/src/lib/libc/sparcv9/crt/__align_cpy_2.s index f4d8a0e2c5..267ff34fe6 100644 --- a/usr/src/lib/libc/sparcv9/crt/__align_cpy_2.s +++ b/usr/src/lib/libc/sparcv9/crt/__align_cpy_2.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1997, Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -40,8 +40,6 @@ #include <sys/asm_linkage.h> -#include "synonyms.h" - ENTRY(__align_cpy_2) cmp %o0, %o1 be,pn %xcc, .done ! Identical addresses--done. diff --git a/usr/src/lib/libc/sparcv9/crt/__align_cpy_4.s b/usr/src/lib/libc/sparcv9/crt/__align_cpy_4.s index 801f7fd57f..b307e6a9e2 100644 --- a/usr/src/lib/libc/sparcv9/crt/__align_cpy_4.s +++ b/usr/src/lib/libc/sparcv9/crt/__align_cpy_4.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1997, Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" - .file "%M%" + .file "%M%" /* __align_cpy_4(s1, s2, n) * @@ -59,8 +59,6 @@ #include <sys/asm_linkage.h> -#include "synonyms.h" - ENTRY(__align_cpy_4) brz,pn %o2, .done ! Skip out if no bytes to copy. cmp %o0, %o1 diff --git a/usr/src/lib/libc/sparcv9/crt/__align_cpy_8.s b/usr/src/lib/libc/sparcv9/crt/__align_cpy_8.s index 87fbcbc187..da54955ef9 100644 --- a/usr/src/lib/libc/sparcv9/crt/__align_cpy_8.s +++ b/usr/src/lib/libc/sparcv9/crt/__align_cpy_8.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1997, Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" - .file "%M%" + .file "%M%" /* __align_cpy_8(s1, s2, n) * @@ -72,8 +72,6 @@ #include <sys/asm_linkage.h> -#include "synonyms.h" - ENTRY(__align_cpy_8) ENTRY(__align_cpy_16) cmp %o0, %o1 ! Identical--do nothing. diff --git a/usr/src/lib/libc/sparcv9/crt/_ftou.c b/usr/src/lib/libc/sparcv9/crt/_ftou.c index 8f960205f3..bfc4802836 100644 --- a/usr/src/lib/libc/sparcv9/crt/_ftou.c +++ b/usr/src/lib/libc/sparcv9/crt/_ftou.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include "libc.h" diff --git a/usr/src/lib/libc/sparcv9/fp/_Q_get_rp_rd.s b/usr/src/lib/libc/sparcv9/fp/_Q_get_rp_rd.s index 85b66c3c20..d5a7c6c413 100644 --- a/usr/src/lib/libc/sparcv9/fp/_Q_get_rp_rd.s +++ b/usr/src/lib/libc/sparcv9/fp/_Q_get_rp_rd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 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" -#include "synonyms.h" + .file "%M%" + #include <sys/asm_linkage.h> ENTRY(_QgetRD) diff --git a/usr/src/lib/libc/sparcv9/fp/fpgetmask.s b/usr/src/lib/libc/sparcv9/fp/fpgetmask.s index 9a42594805..5bd3d6322e 100644 --- a/usr/src/lib/libc/sparcv9/fp/fpgetmask.s +++ b/usr/src/lib/libc/sparcv9/fp/fpgetmask.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpgetmask.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpgetmask,function) -#include "synonyms.h" - ENTRY(fpgetmask) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x0f800000, %o4 ! mask of trap enable bits diff --git a/usr/src/lib/libc/sparcv9/fp/fpgetrnd.s b/usr/src/lib/libc/sparcv9/fp/fpgetrnd.s index e12e975bdf..9f0e0e0849 100644 --- a/usr/src/lib/libc/sparcv9/fp/fpgetrnd.s +++ b/usr/src/lib/libc/sparcv9/fp/fpgetrnd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpgetrnd.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpgetround,function) -#include "synonyms.h" - ENTRY(fpgetround) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage st %fsr, [%sp+STACK_BIAS+ARGPUSH] ! get fsr value diff --git a/usr/src/lib/libc/sparcv9/fp/fpgetsticky.s b/usr/src/lib/libc/sparcv9/fp/fpgetsticky.s index 2ba37fff19..060fa74df2 100644 --- a/usr/src/lib/libc/sparcv9/fp/fpgetsticky.s +++ b/usr/src/lib/libc/sparcv9/fp/fpgetsticky.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.11 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpgetsticky.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpgetsticky,function) -#include "synonyms.h" - ENTRY(fpgetsticky) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x000003e0, %o4 ! mask of accrued exception bits diff --git a/usr/src/lib/libc/sparcv9/fp/fpsetmask.s b/usr/src/lib/libc/sparcv9/fp/fpsetmask.s index 3cae67dad5..38c359e33f 100644 --- a/usr/src/lib/libc/sparcv9/fp/fpsetmask.s +++ b/usr/src/lib/libc/sparcv9/fp/fpsetmask.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,18 @@ * * CDDL HEADER END */ + +/* + * 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" -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ - -.ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 1.4.1.9 */ + .file "%M%" /* * fp_except fpsetmask(mask) @@ -37,14 +40,10 @@ * is cleared */ - .file "fpsetmask.s" - -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpsetmask,function) -#include "synonyms.h" - ENTRY(fpsetmask) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x0f800000, %o4 ! mask of trap enable bits diff --git a/usr/src/lib/libc/sparcv9/fp/fpsetrnd.s b/usr/src/lib/libc/sparcv9/fp/fpsetrnd.s index c21b1e454a..deaec67f5d 100644 --- a/usr/src/lib/libc/sparcv9/fp/fpsetrnd.s +++ b/usr/src/lib/libc/sparcv9/fp/fpsetrnd.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,22 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5.1.9 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpsetrnd.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpsetround,function) -#include "synonyms.h" - ENTRY(fpsetround) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0xc0000000, %o4 ! mask of round control bits diff --git a/usr/src/lib/libc/sparcv9/fp/fpsetsticky.s b/usr/src/lib/libc/sparcv9/fp/fpsetsticky.s index 934bbacd50..54dec4ab6b 100644 --- a/usr/src/lib/libc/sparcv9/fp/fpsetsticky.s +++ b/usr/src/lib/libc/sparcv9/fp/fpsetsticky.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,23 +18,23 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ -/* Copyright (c) 1989 by Sun Microsystems, Inc. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -.ident "%Z%%M% %I% %E% SMI" - /* SVr4.0 1.4.1.7 */ +#pragma ident "%Z%%M% %I% %E% SMI" - .file "fpsetsticky.s" + .file "%M%" -#include <sys/asm_linkage.h> +#include "SYS.h" ANSI_PRAGMA_WEAK(fpsetsticky,function) -#include "synonyms.h" - ENTRY(fpsetsticky) add %sp, -SA(MINFRAME), %sp ! get an additional word of storage set 0x000003e0, %o4 ! mask of accrued exception bits diff --git a/usr/src/lib/libc/sparcv9/gen/_xregs_clrptr.c b/usr/src/lib/libc/sparcv9/gen/_xregs_clrptr.c index b6c09be578..1873ed6c18 100644 --- a/usr/src/lib/libc/sparcv9/gen/_xregs_clrptr.c +++ b/usr/src/lib/libc/sparcv9/gen/_xregs_clrptr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <ucontext.h> #include "libc.h" diff --git a/usr/src/lib/libc/sparcv9/gen/abs.s b/usr/src/lib/libc/sparcv9/gen/abs.s index 9e483e2ca2..4d39a59436 100644 --- a/usr/src/lib/libc/sparcv9/gen/abs.s +++ b/usr/src/lib/libc/sparcv9/gen/abs.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,19 +20,15 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" -#include <sys/asm_linkage.h> - - ANSI_PRAGMA_WEAK(llabs,function) - -#include "synonyms.h" +#include "SYS.h" /* * int abs(int arg); diff --git a/usr/src/lib/libc/sparcv9/gen/ecvt.c b/usr/src/lib/libc/sparcv9/gen/ecvt.c index 1e7e9e6111..422e980fb9 100644 --- a/usr/src/lib/libc/sparcv9/gen/ecvt.c +++ b/usr/src/lib/libc/sparcv9/gen/ecvt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" /* * ecvt converts to decimal @@ -37,13 +36,11 @@ * sign is set to 0 for positive, 1 for negative * */ -#pragma weak ecvt = _ecvt -#pragma weak fcvt = _fcvt -#pragma weak qecvt = _qecvt -#pragma weak qfcvt = _qfcvt -#pragma weak qgcvt = _qgcvt -#include "synonyms.h" +#pragma weak _ecvt = ecvt +#pragma weak _fcvt = fcvt + +#include "lint.h" #include <sys/types.h> #include <stdlib.h> #include <floatingpoint.h> diff --git a/usr/src/lib/libc/sparcv9/gen/getctxt.c b/usr/src/lib/libc/sparcv9/gen/getctxt.c index b119860217..3213955108 100644 --- a/usr/src/lib/libc/sparcv9/gen/getctxt.c +++ b/usr/src/lib/libc/sparcv9/gen/getctxt.c @@ -29,9 +29,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak getcontext = _getcontext +#pragma weak _getcontext = getcontext -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <ucontext.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/sparcv9/gen/makectxt.c b/usr/src/lib/libc/sparcv9/gen/makectxt.c index 9dc4c64697..7519bdabcb 100644 --- a/usr/src/lib/libc/sparcv9/gen/makectxt.c +++ b/usr/src/lib/libc/sparcv9/gen/makectxt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,21 +18,21 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak makecontext = _makecontext -#pragma weak __makecontext_v2 = ___makecontext_v2 +#pragma weak _makecontext = makecontext +#pragma weak ___makecontext_v2 = __makecontext_v2 -#include "synonyms.h" +#include "lint.h" #include <stdarg.h> #include <strings.h> #include <sys/ucontext.h> @@ -53,7 +52,7 @@ static void resumecontext(void); void -_makecontext(ucontext_t *ucp, void (*func)(), int argc, ...) +makecontext(ucontext_t *ucp, void (*func)(), int argc, ...) { greg_t *reg; long *tsp; diff --git a/usr/src/lib/libc/sparcv9/gen/memchr.s b/usr/src/lib/libc/sparcv9/gen/memchr.s index d0f4a6c905..d04b7b6526 100644 --- a/usr/src/lib/libc/sparcv9/gen/memchr.s +++ b/usr/src/lib/libc/sparcv9/gen/memchr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" - .file "%M%" /* * Return the ptr in sptr at which the character c1 appears; * or NULL if not found in n chars; don't stop at \0. @@ -47,7 +48,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! The first part of this algorithm focuses on determining ! whether or not the desired character is in the first few bytes diff --git a/usr/src/lib/libc/sparcv9/gen/memcmp.s b/usr/src/lib/libc/sparcv9/gen/memcmp.s index bc1846b180..d551a68b6d 100644 --- a/usr/src/lib/libc/sparcv9/gen/memcmp.s +++ b/usr/src/lib/libc/sparcv9/gen/memcmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1997-1998 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -55,8 +55,6 @@ ANSI_PRAGMA_WEAK(memcmp,function) -#include "synonyms.h" - ENTRY(memcmp) cmp %o0, %o1 ! s1 == s2? be,pn %xcc, .cmpeq diff --git a/usr/src/lib/libc/sparcv9/gen/memcpy.s b/usr/src/lib/libc/sparcv9/gen/memcpy.s index 46e22d08b2..4bea160cee 100644 --- a/usr/src/lib/libc/sparcv9/gen/memcpy.s +++ b/usr/src/lib/libc/sparcv9/gen/memcpy.s @@ -24,7 +24,7 @@ * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -58,8 +58,6 @@ ANSI_PRAGMA_WEAK(memcpy,function) -#include "synonyms.h" - ENTRY(memcpy) ENTRY(__align_cpy_1) mov %o0, %g5 ! save des address for return val diff --git a/usr/src/lib/libc/sparcv9/gen/memmove.s b/usr/src/lib/libc/sparcv9/gen/memmove.s index 05348f1997..5b85b05c20 100644 --- a/usr/src/lib/libc/sparcv9/gen/memmove.s +++ b/usr/src/lib/libc/sparcv9/gen/memmove.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1997, by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -32,8 +32,6 @@ ANSI_PRAGMA_WEAK(memmove,function) -#include "synonyms.h" - /* * memmove(s1, s2, len) * Copy s2 to s1, always copy n bytes. diff --git a/usr/src/lib/libc/sparcv9/gen/memset.s b/usr/src/lib/libc/sparcv9/gen/memset.s index 72fe265317..92110f5e6a 100644 --- a/usr/src/lib/libc/sparcv9/gen/memset.s +++ b/usr/src/lib/libc/sparcv9/gen/memset.s @@ -24,7 +24,7 @@ * Use is subject to license terms. */ - .ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -76,8 +76,6 @@ ANSI_PRAGMA_WEAK(memset,function) -#include "synonyms.h" - ENTRY(memset) mov %o0, %o5 ! need to return this value cmp %o2, 7 diff --git a/usr/src/lib/libc/sparcv9/gen/setjmp.s b/usr/src/lib/libc/sparcv9/gen/setjmp.s index 35f977ea05..0d381be0c8 100644 --- a/usr/src/lib/libc/sparcv9/gen/setjmp.s +++ b/usr/src/lib/libc/sparcv9/gen/setjmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,26 +18,24 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 1987-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" - .file "setjmp.s" + .file "%M%" #include <sys/asm_linkage.h> ANSI_PRAGMA_WEAK(setjmp,function) ANSI_PRAGMA_WEAK(longjmp,function) -#include "synonyms.h" - #include <sys/trap.h> JB_FLAGS = (0*8) ! offsets in jmpbuf (see siglongjmp.c) diff --git a/usr/src/lib/libc/sparcv9/gen/siginfolst.c b/usr/src/lib/libc/sparcv9/gen/siginfolst.c index 8939850c60..712e70c582 100644 --- a/usr/src/lib/libc/sparcv9/gen/siginfolst.c +++ b/usr/src/lib/libc/sparcv9/gen/siginfolst.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "synonyms.h" +#include "lint.h" #include <signal.h> #include <siginfo.h> diff --git a/usr/src/lib/libc/sparcv9/gen/siglongjmp.c b/usr/src/lib/libc/sparcv9/gen/siglongjmp.c index 5efc2e28a2..83a640397d 100644 --- a/usr/src/lib/libc/sparcv9/gen/siglongjmp.c +++ b/usr/src/lib/libc/sparcv9/gen/siglongjmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,19 +20,18 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak siglongjmp = _siglongjmp +#pragma weak _siglongjmp = siglongjmp -#include "synonyms.h" +#include "lint.h" #include <sys/types.h> #include <sys/stack.h> #include <sys/frame.h> diff --git a/usr/src/lib/libc/sparcv9/gen/strcasecmp.s b/usr/src/lib/libc/sparcv9/gen/strcasecmp.s index a9423ea749..32ac6bf3e1 100644 --- a/usr/src/lib/libc/sparcv9/gen/strcasecmp.s +++ b/usr/src/lib/libc/sparcv9/gen/strcasecmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" + /* * The strcasecmp() function is a case insensitive versions of strcmp(). * It assumes the ASCII character set and ignores differences in case @@ -116,9 +117,7 @@ * Both algorithms have been tested exhaustively for all possible 2^32 inputs. */ - #include <sys/asm_linkage.h> -#include "synonyms.h" ! The first part of this algorithm walks through the beginning of ! both strings a byte at a time until the source ptr is aligned to diff --git a/usr/src/lib/libc/sparcv9/gen/strchr.s b/usr/src/lib/libc/sparcv9/gen/strchr.s index afc1fff4db..910399e822 100644 --- a/usr/src/lib/libc/sparcv9/gen/strchr.s +++ b/usr/src/lib/libc/sparcv9/gen/strchr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -35,7 +35,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! Here, we start by checking to see if we're searching the dest ! string for a null byte. We have fast code for this, so it's diff --git a/usr/src/lib/libc/sparcv9/gen/strcmp.s b/usr/src/lib/libc/sparcv9/gen/strcmp.s index 57525d2347..34c9d46d18 100644 --- a/usr/src/lib/libc/sparcv9/gen/strcmp.s +++ b/usr/src/lib/libc/sparcv9/gen/strcmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -52,7 +51,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! This strcmp implementation first determines whether s1 is aligned. ! If it is not, it attempts to align it and then checks the diff --git a/usr/src/lib/libc/sparcv9/gen/strcpy.s b/usr/src/lib/libc/sparcv9/gen/strcpy.s index 77d98e1856..ac97dd6566 100644 --- a/usr/src/lib/libc/sparcv9/gen/strcpy.s +++ b/usr/src/lib/libc/sparcv9/gen/strcpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -51,7 +51,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! This implementation of strcpy works by first checking the ! source alignment and copying byte, half byte, or word diff --git a/usr/src/lib/libc/sparcv9/gen/strlcpy.s b/usr/src/lib/libc/sparcv9/gen/strlcpy.s index 24e5b558b7..810b331921 100644 --- a/usr/src/lib/libc/sparcv9/gen/strlcpy.s +++ b/usr/src/lib/libc/sparcv9/gen/strlcpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -40,7 +40,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! strlcpy implementation is similar to that of strcpy, except ! in this case, the maximum size of the detination must be diff --git a/usr/src/lib/libc/sparcv9/gen/strlen.s b/usr/src/lib/libc/sparcv9/gen/strlen.s index 09da4ed196..e709690f79 100644 --- a/usr/src/lib/libc/sparcv9/gen/strlen.s +++ b/usr/src/lib/libc/sparcv9/gen/strlen.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -50,7 +49,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! The object of strlen is to, as quickly as possible, find the ! null byte. To this end, we attempt to get our string aligned diff --git a/usr/src/lib/libc/sparcv9/gen/strncmp.s b/usr/src/lib/libc/sparcv9/gen/strncmp.s index 56460a213a..519669005c 100644 --- a/usr/src/lib/libc/sparcv9/gen/strncmp.s +++ b/usr/src/lib/libc/sparcv9/gen/strncmp.s @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -50,7 +50,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ENTRY(strncmp) save %sp, -SA(WINDOWSIZE), %sp diff --git a/usr/src/lib/libc/sparcv9/gen/strncpy.s b/usr/src/lib/libc/sparcv9/gen/strncpy.s index 03f04c999c..fe73b67bf6 100644 --- a/usr/src/lib/libc/sparcv9/gen/strncpy.s +++ b/usr/src/lib/libc/sparcv9/gen/strncpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -53,7 +53,6 @@ */ #include <sys/asm_linkage.h> -#include "synonyms.h" ! strncpy works similarly to strcpy, except that n bytes of s2 ! are copied to s1. If a null character is reached in s2 yet more diff --git a/usr/src/lib/libc/sparcv9/gen/swapctxt.c b/usr/src/lib/libc/sparcv9/gen/swapctxt.c index 8c052ca843..c2b527e868 100644 --- a/usr/src/lib/libc/sparcv9/gen/swapctxt.c +++ b/usr/src/lib/libc/sparcv9/gen/swapctxt.c @@ -29,9 +29,9 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak swapcontext = _swapcontext +#pragma weak _swapcontext = swapcontext -#include "synonyms.h" +#include "lint.h" #include "thr_uberdata.h" #include <ucontext.h> #include <sys/types.h> diff --git a/usr/src/lib/libc/sparcv9/inc/SYS.h b/usr/src/lib/libc/sparcv9/inc/SYS.h index c9496cdcf2..10b1cd7bed 100644 --- a/usr/src/lib/libc/sparcv9/inc/SYS.h +++ b/usr/src/lib/libc/sparcv9/inc/SYS.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +39,6 @@ #include <sys/asm_linkage.h> #include <sys/syscall.h> #include <sys/errno.h> -#include "synonyms.h" /* * While it's tempting to imagine we could use 'rd %pc' here, diff --git a/usr/src/lib/libc/sparcv9/mapfile-vers b/usr/src/lib/libc/sparcv9/mapfile-vers index ee7b4afdbb..1070574249 100644 --- a/usr/src/lib/libc/sparcv9/mapfile-vers +++ b/usr/src/lib/libc/sparcv9/mapfile-vers @@ -796,6 +796,7 @@ SUNWprivate_1.1 { _install_utrap; _memcmp = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1; _memcpy = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1; + _memcpy = NODYNSORT; _memmove = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1; _memset = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1; nop; diff --git a/usr/src/lib/libc_db/common/mapfile-vers b/usr/src/lib/libc_db/common/mapfile-vers index e01525abd4..d2e6ff9690 100644 --- a/usr/src/lib/libc_db/common/mapfile-vers +++ b/usr/src/lib/libc_db/common/mapfile-vers @@ -93,55 +93,8 @@ SUNW_0.9 { SUNWprivate_1.1 { global: - __td_init; - __td_log; - __td_sync_get_info; td_sync_get_stats; - __td_sync_get_stats; - __td_sync_setstate; - __td_sync_waiters; - __td_ta_clear_event; - __td_ta_delete; - __td_ta_enable_stats; - __td_ta_event_addr; - __td_ta_event_getmsg; - __td_ta_get_nthreads; - __td_ta_get_ph; - __td_ta_get_stats; - __td_ta_map_addr2sync; - __td_ta_map_id2thr; - __td_ta_map_lwp2thr; - __td_ta_new; - __td_ta_reset_stats; - __td_ta_setconcurrency; - __td_ta_set_event; - __td_ta_sync_iter; td_ta_sync_tracking_enable; - __td_ta_sync_tracking_enable; - __td_ta_thr_iter; - __td_ta_tsd_iter; - __td_thr_clear_event; - __td_thr_dbresume; - __td_thr_dbsuspend; - __td_thr_event_enable; - __td_thr_event_getmsg; - __td_thr_getfpregs; - __td_thr_getgregs; - __td_thr_get_info; - __td_thr_getxregs; - __td_thr_getxregsize; - __td_thr_lockowner; - __td_thr_set_event; - __td_thr_setfpregs; - __td_thr_setgregs; - __td_thr_setprio; - __td_thr_setsigpending; - __td_thr_setxregs; - __td_thr_sigsetmask; - __td_thr_sleepinfo; - __td_thr_tlsbase; - __td_thr_tsd; - __td_thr_validate; local: *; }; diff --git a/usr/src/lib/libc_psr/sun4u-opl/Makefile.com b/usr/src/lib/libc_psr/sun4u-opl/Makefile.com index 64760d301c..107550d626 100644 --- a/usr/src/lib/libc_psr/sun4u-opl/Makefile.com +++ b/usr/src/lib/libc_psr/sun4u-opl/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -43,7 +43,7 @@ CTFCONVERT_POST = : CTFMERGE_LIB = : LIBS = $(DYNLIB) -IFLAGS = -I$(SRC)/lib/libc/inc -I$(SRC)/uts/sun4u \ +IFLAGS = -I$(SRC)/uts/sun4u \ -I$(ROOT)/usr/platform/sun4u/include CPPFLAGS = -D_REENTRANT -D$(MACH) $(IFLAGS) $(CPPFLAGS.master) ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) diff --git a/usr/src/lib/libc_psr/sun4u-opl/common/memcpy.s b/usr/src/lib/libc_psr/sun4u-opl/common/memcpy.s index 8968fcec19..68e962a576 100644 --- a/usr/src/lib/libc_psr/sun4u-opl/common/memcpy.s +++ b/usr/src/lib/libc_psr/sun4u-opl/common/memcpy.s @@ -18,14 +18,15 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" - .file "memcpy.s" + .file "%M%" /* * memcpy(s1, s2, len) @@ -75,9 +76,6 @@ ANSI_PRAGMA_WEAK(memmove,function) ANSI_PRAGMA_WEAK(memcpy,function) -#include "synonyms.h" - - ENTRY(memmove) prefetch [%o1], N_READS_STRONG prefetch [%o0], N_WRITES_STRONG diff --git a/usr/src/lib/libc_psr/sun4u-us3/common/memcmp.s b/usr/src/lib/libc_psr/sun4u-us3/common/memcmp.s index aa1d149f88..c96238e6c2 100644 --- a/usr/src/lib/libc_psr/sun4u-us3/common/memcmp.s +++ b/usr/src/lib/libc_psr/sun4u-us3/common/memcmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -58,8 +58,6 @@ ANSI_PRAGMA_WEAK(memcmp,function) -#include "synonyms.h" - ENTRY(memcmp) cmp %o0, %o1 ! s1 == s2? be %ncc, .cmpeq diff --git a/usr/src/lib/libc_psr/sun4u-us3/common/memcpy.s b/usr/src/lib/libc_psr/sun4u-us3/common/memcpy.s index 30351a1042..125955e232 100644 --- a/usr/src/lib/libc_psr/sun4u-us3/common/memcpy.s +++ b/usr/src/lib/libc_psr/sun4u-us3/common/memcpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -73,9 +73,6 @@ ANSI_PRAGMA_WEAK(memmove,function) ANSI_PRAGMA_WEAK(memcpy,function) -#include "synonyms.h" - - ENTRY(memmove) cmp %o1, %o0 ! if from address is >= to use forward copy bgeu %ncc, .forcpy ! else use backward if ... diff --git a/usr/src/lib/libc_psr/sun4u-us3/common/memset.s b/usr/src/lib/libc_psr/sun4u-us3/common/memset.s index 6475afa479..459dd96934 100644 --- a/usr/src/lib/libc_psr/sun4u-us3/common/memset.s +++ b/usr/src/lib/libc_psr/sun4u-us3/common/memset.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" + /* * char *memset(sp, c, n) * @@ -54,8 +55,6 @@ ANSI_PRAGMA_WEAK(memset,function) -#include "synonyms.h" - #define ALIGN8(X) (((X) + 7) & ~7) #define BLOCK_SIZE 64 diff --git a/usr/src/lib/libc_psr/sun4u/Makefile.com b/usr/src/lib/libc_psr/sun4u/Makefile.com index e9482afa13..7b5a11d942 100644 --- a/usr/src/lib/libc_psr/sun4u/Makefile.com +++ b/usr/src/lib/libc_psr/sun4u/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,7 +44,7 @@ CTFCONVERT_POST = : CTFMERGE_LIB = : LIBS = $(DYNLIB) -IFLAGS = -I$(SRC)/lib/libc/inc -I$(SRC)/uts/$(PLATFORM) \ +IFLAGS = -I$(SRC)/uts/$(PLATFORM) \ -I$(ROOT)/usr/platform/$(PLATFORM)/include CPPFLAGS = -D_REENTRANT -D$(MACH) $(IFLAGS) $(CPPFLAGS.master) ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) diff --git a/usr/src/lib/libc_psr/sun4u/common/memcmp.s b/usr/src/lib/libc_psr/sun4u/common/memcmp.s index b20a5619c2..b5c0342c9d 100644 --- a/usr/src/lib/libc_psr/sun4u/common/memcmp.s +++ b/usr/src/lib/libc_psr/sun4u/common/memcmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,12 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 1995-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" @@ -56,8 +56,6 @@ ANSI_PRAGMA_WEAK(memcmp,function) -#include "synonyms.h" - ENTRY(memcmp) cmp %o0, %o1 ! s1 == s2? be %ncc, .cmpeq diff --git a/usr/src/lib/libc_psr/sun4u/common/memcpy.s b/usr/src/lib/libc_psr/sun4u/common/memcpy.s index dee0af7412..751d8a81d0 100644 --- a/usr/src/lib/libc_psr/sun4u/common/memcpy.s +++ b/usr/src/lib/libc_psr/sun4u/common/memcpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 1995-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" + /* * memcpy(s1, s2, len) * @@ -57,8 +58,6 @@ ANSI_PRAGMA_WEAK(memmove,function) ANSI_PRAGMA_WEAK(memcpy,function) -#include "synonyms.h" - ENTRY(memmove) cmp %o1, %o0 ! if from address is >= to use forward copy bgeu %ncc, forcpy ! else use backward if ... diff --git a/usr/src/lib/libc_psr/sun4u/common/memset.s b/usr/src/lib/libc_psr/sun4u/common/memset.s index 3bfb3a193f..64533915b9 100644 --- a/usr/src/lib/libc_psr/sun4u/common/memset.s +++ b/usr/src/lib/libc_psr/sun4u/common/memset.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 1995-1998,2000-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" .file "%M%" + /* * char *memset(sp, c, n) * @@ -54,8 +55,6 @@ ANSI_PRAGMA_WEAK(memset,function) -#include "synonyms.h" - #define ALIGN8(X) (((X) + 7) & ~7) .section ".text" diff --git a/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com b/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com index b04ba6255d..40f0cae3e9 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com +++ b/usr/src/lib/libc_psr/sun4u_hwcap1/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,7 +44,7 @@ CTFCONVERT_POST = : CTFMERGE_LIB = : LIBS = $(DYNLIB) -IFLAGS = -I$(SRC)/lib/libc/inc -I$(SRC)/uts/sun4u \ +IFLAGS = -I$(SRC)/uts/sun4u \ -I$(ROOT)/usr/platform/sun4u/include # See note in memcpy.s for use of bst threshold. CPPFLAGS = -DBSTORE_SIZE=256 \ diff --git a/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com b/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com index fabbd777bd..0a625fe91f 100644 --- a/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com +++ b/usr/src/lib/libc_psr/sun4u_hwcap2/Makefile.com @@ -20,7 +20,7 @@ # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,7 +44,7 @@ CTFCONVERT_POST = : CTFMERGE_LIB = : LIBS = $(DYNLIB) -IFLAGS = -I$(SRC)/lib/libc/inc -I$(SRC)/uts/sun4u \ +IFLAGS = -I$(SRC)/uts/sun4u \ -I$(ROOT)/usr/platform/sun4u/include # See note in memcpy.s for use of bst threshold. CPPFLAGS = -DBSTORE_SIZE=65536 -DPANTHER_ONLY \ diff --git a/usr/src/lib/libc_psr/sun4v/common/memcpy.s b/usr/src/lib/libc_psr/sun4v/common/memcpy.s index 9dd0c89993..af5547dd9d 100644 --- a/usr/src/lib/libc_psr/sun4v/common/memcpy.s +++ b/usr/src/lib/libc_psr/sun4v/common/memcpy.s @@ -18,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" - .file "memcpy.s" /* * memcpy(s1, s2, len) * @@ -190,8 +192,6 @@ ANSI_PRAGMA_WEAK(memmove,function) ANSI_PRAGMA_WEAK(memcpy,function) -#include "synonyms.h" - ENTRY(memmove) cmp %o1, %o0 ! if from address is >= to use forward copy bgeu,pn %ncc, forcpy ! else use backward if ... diff --git a/usr/src/lib/libc_psr/sun4v/common/memset.s b/usr/src/lib/libc_psr/sun4v/common/memset.s index 2ffbaf0e3d..0596698bd8 100644 --- a/usr/src/lib/libc_psr/sun4v/common/memset.s +++ b/usr/src/lib/libc_psr/sun4v/common/memset.s @@ -18,14 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -.ident "%Z%%M% %I% %E% SMI" +#pragma ident "%Z%%M% %I% %E% SMI" + + .file "%M%" - .file "memset.s" /* * char *memset(sp, c, n) * @@ -69,8 +71,6 @@ ANSI_PRAGMA_WEAK(memset,function) -#include "synonyms.h" - .section ".text" .align 32 diff --git a/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com b/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com index 2085c80f0c..6d3709577a 100644 --- a/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com +++ b/usr/src/lib/libc_psr/sun4v_hwcap1/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,8 +38,7 @@ CTFCONVERT_POST = : CTFMERGE_LIB = : LIBS = $(DYNLIB) -IFLAGS = -I$(SRC)/lib/libc/inc -I$(SRC)/uts/sun4v \ - -I$(ROOT)/usr/include/v9 +IFLAGS = -I$(SRC)/uts/sun4v -I$(ROOT)/usr/include/v9 CPPFLAGS = -D_REENTRANT -D$(MACH) -DNIAGARA_IMPL $(IFLAGS) $(CPPFLAGS.master) ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) ASFLAGS = -P $(ASDEFS) diff --git a/usr/src/lib/libc_psr/sun4v_hwcap2/Makefile.com b/usr/src/lib/libc_psr/sun4v_hwcap2/Makefile.com index ac2e1f48f6..846d33737f 100644 --- a/usr/src/lib/libc_psr/sun4v_hwcap2/Makefile.com +++ b/usr/src/lib/libc_psr/sun4v_hwcap2/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -38,7 +38,7 @@ CTFCONVERT_POST = : CTFMERGE_LIB = : LIBS = $(DYNLIB) -IFLAGS = -I$(SRC)/lib/libc/inc -I$(SRC)/uts/sun4v \ +IFLAGS = -I$(SRC)/uts/sun4v \ -I$(ROOT)/usr/platform/sun4v/include -I$(ROOT)/usr/include/v9 CPPFLAGS = -D_REENTRANT -D$(MACH) -DNIAGARA2_IMPL $(IFLAGS) $(CPPFLAGS.master) ASDEFS = -D__STDC__ -D_ASM $(CPPFLAGS) diff --git a/usr/src/lib/libcmdutils/Makefile.com b/usr/src/lib/libcmdutils/Makefile.com index e12e5b07c5..b2b6e1b533 100644 --- a/usr/src/lib/libcmdutils/Makefile.com +++ b/usr/src/lib/libcmdutils/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -47,7 +47,7 @@ CPPFLAGS += -I.. -I../../common/inc -D_REENTRANT -D_FILE_OFFSET_BITS=64 .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libcmdutils/common/process_xattrs.c b/usr/src/lib/libcmdutils/common/process_xattrs.c index e6a5c1f7c7..dc37d586a8 100644 --- a/usr/src/lib/libcmdutils/common/process_xattrs.c +++ b/usr/src/lib/libcmdutils/common/process_xattrs.c @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -25,7 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include <c_synonyms.h> #include "libcmdutils.h" diff --git a/usr/src/lib/libcmdutils/common/sysattrs.c b/usr/src/lib/libcmdutils/common/sysattrs.c index 5868e765cc..39b41e7b65 100644 --- a/usr/src/lib/libcmdutils/common/sysattrs.c +++ b/usr/src/lib/libcmdutils/common/sysattrs.c @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -25,7 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include <c_synonyms.h> #include <unistd.h> #include <stdlib.h> #include <string.h> diff --git a/usr/src/lib/libcmdutils/common/writefile.c b/usr/src/lib/libcmdutils/common/writefile.c index 3e36f90c61..750974c581 100644 --- a/usr/src/lib/libcmdutils/common/writefile.c +++ b/usr/src/lib/libcmdutils/common/writefile.c @@ -18,6 +18,12 @@ * * CDDL HEADER END */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -30,14 +36,9 @@ * software developed by the University of California, Berkeley, and its * contributors. */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ #pragma ident "%Z%%M% %I% %E% SMI" -#include <c_synonyms.h> #include "libcmdutils.h" diff --git a/usr/src/lib/libcrypt/Makefile.com b/usr/src/lib/libcrypt/Makefile.com index 0e7af514ce..2f93024301 100644 --- a/usr/src/lib/libcrypt/Makefile.com +++ b/usr/src/lib/libcrypt/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -50,7 +50,7 @@ LDLIBS += -lgen -lc .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libcrypt/common/cryptio.c b/usr/src/lib/libcrypt/common/cryptio.c index 09116fc321..78b96aff48 100644 --- a/usr/src/lib/libcrypt/common/cryptio.c +++ b/usr/src/lib/libcrypt/common/cryptio.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,23 +20,20 @@ */ /* - * Copyright 2006 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 run_setkey = _run_setkey -#pragma weak run_crypt = _run_crypt -#pragma weak crypt_close = _crypt_close -#pragma weak makekey = _makekey +#pragma weak _run_setkey = run_setkey +#pragma weak _run_crypt = run_crypt +#pragma weak _crypt_close = crypt_close +#pragma weak _makekey = makekey -#include "des_synonyms.h" #include <stdio.h> #include <signal.h> #include <fcntl.h> @@ -133,7 +129,7 @@ run_crypt(long offset, char *buffer, unsigned int count, int p[2]) header.offset = offset; pstat = signal(SIGPIPE, SIG_IGN); if (write(p[READER], (char *)&header, sizeof (header)) - != sizeof (header)) { + != sizeof (header)) { (void) crypt_close_nolock(p); (void) signal(SIGPIPE, pstat); (void) mutex_unlock(&lock); diff --git a/usr/src/lib/libcrypt/common/des.c b/usr/src/lib/libcrypt/common/des.c index 42eaf80a52..d7847e397b 100644 --- a/usr/src/lib/libcrypt/common/des.c +++ b/usr/src/lib/libcrypt/common/des.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,13 +33,11 @@ */ #pragma ident "%Z%%M% %I% %E% SMI" -/*LINTLIBRARY*/ /* * DES encryption library routines */ -#include "des_synonyms.h" #include <sys/types.h> #include <rpc/des_crypt.h> #include <sys/stat.h> @@ -75,8 +72,8 @@ * Copy 8 bytes */ #define COPY8(src, dst) { \ - char *a = (char *) dst; \ - char *b = (char *) src; \ + char *a = (char *)dst; \ + char *b = (char *)src; \ *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \ *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \ } @@ -85,10 +82,10 @@ * Copy multiple of 8 bytes */ #define DESCOPY(src, dst, len) { \ - char *a = (char *) dst; \ - char *b = (char *) src; \ + char *a = (char *)dst; \ + char *b = (char *)src; \ int i; \ - for (i = (int) len; i > 0; i -= 8) { \ + for (i = (int)len; i > 0; i -= 8) { \ *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \ *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \ } \ @@ -138,7 +135,8 @@ ecb_crypt(char *key, char *buf, size_t len, unsigned int mode) * Common code to cbc_crypt() & ecb_crypt() */ static int -common_crypt(char *key, char *buf, unsigned len, unsigned mode, struct desparams *desp) +common_crypt(char *key, char *buf, unsigned len, + unsigned mode, struct desparams *desp) { int desdev; int res; @@ -148,7 +146,7 @@ common_crypt(char *key, char *buf, unsigned len, unsigned mode, struct desparams return (DESERR_BADPARAM); } desp->des_dir = - ((mode & DES_DIRMASK) == DES_ENCRYPT) ? ENCRYPT : DECRYPT; + ((mode & DES_DIRMASK) == DES_ENCRYPT) ? ENCRYPT : DECRYPT; desdev = mode & DES_DEVMASK; COPY8(key, desp->des_key); @@ -166,11 +164,11 @@ common_crypt(char *key, char *buf, unsigned len, unsigned mode, struct desparams desp->des_len = len; if (len <= DES_QUICKLEN) { DESCOPY(buf, desp->des_data, len); - res = ioctl(g_desfd, (int)DESIOCQUICK, (char *) desp); + res = ioctl(g_desfd, (int)DESIOCQUICK, (char *)desp); DESCOPY(desp->des_data, buf, len); } else { - desp->des_buf = (u_char *) buf; - res = ioctl(g_desfd, (int)DESIOCBLOCK, (char *) desp); + desp->des_buf = (uchar_t *)buf; + res = ioctl(g_desfd, (int)DESIOCBLOCK, (char *)desp); } return (res == 0 ? DESERR_NONE : DESERR_HWERROR); } diff --git a/usr/src/lib/libcrypt/common/des_crypt.c b/usr/src/lib/libcrypt/common/des_crypt.c index ceb64a1f98..d67058dcf0 100644 --- a/usr/src/lib/libcrypt/common/des_crypt.c +++ b/usr/src/lib/libcrypt/common/des_crypt.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,13 +28,11 @@ /* All Rights Reserved */ #pragma ident "%Z%%M% %I% %E% SMI" -/*LINTLIBRARY*/ -#pragma weak des_crypt = _des_crypt -#pragma weak des_encrypt = _des_encrypt -#pragma weak des_setkey = _des_setkey +#pragma weak _des_crypt = des_crypt +#pragma weak _des_encrypt = des_encrypt +#pragma weak _des_setkey = des_setkey -#include "des_synonyms.h" #include <sys/types.h> #include <crypt.h> #include "des_soft.h" @@ -305,7 +303,7 @@ des_encrypt_nolock(char *block, int edflag) /* EXPORT DELETE START */ if (edflag) - (void) des_decrypt1(block, L, IP, &L[32], + (void) _des_decrypt1(block, L, IP, &L[32], preS, E, KS, S, f, tempL, P, FP); else (void) des_encrypt1(block, L, IP, &L[32], diff --git a/usr/src/lib/libcrypt/common/des_encrypt.c b/usr/src/lib/libcrypt/common/des_encrypt.c index 13a9310ee3..937b9c8a11 100644 --- a/usr/src/lib/libcrypt/common/des_encrypt.c +++ b/usr/src/lib/libcrypt/common/des_encrypt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,20 +19,18 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" -/*LINTLIBRARY*/ -#pragma weak des_encrypt1 = _des_encrypt1 +#pragma weak _des_encrypt1 = des_encrypt1 -#include "des_synonyms.h" #include <sys/types.h> void @@ -80,11 +77,11 @@ des_encrypt1(char *block, char *L, char *IP, char *R, char *preS, char *E, for (j = 0; j < 8; j++) { t = 6*j; k = S[j][(preS[t+0]<<5)+ - (preS[t+1]<<3)+ - (preS[t+2]<<2)+ - (preS[t+3]<<1)+ - (preS[t+4]<<0)+ - (preS[t+5]<<4)]; + (preS[t+1]<<3)+ + (preS[t+2]<<2)+ + (preS[t+3]<<1)+ + (preS[t+4]<<0)+ + (preS[t+5]<<4)]; t = 4*j; f[t+0] = (k>>3)&01; f[t+1] = (k>>2)&01; diff --git a/usr/src/lib/libcrypt/common/des_soft.c b/usr/src/lib/libcrypt/common/des_soft.c index 11a97d5420..eea97578b1 100644 --- a/usr/src/lib/libcrypt/common/des_soft.c +++ b/usr/src/lib/libcrypt/common/des_soft.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,7 +33,6 @@ */ #pragma ident "%Z%%M% %I% %E% SMI" -/*LINTLIBRARY*/ /* * Warning! Things are arranged very carefully in this file to @@ -50,7 +48,6 @@ #define CRYPT /* cannot configure out of user-level code */ #endif -#include "des_synonyms.h" #ifdef CRYPT #include <sys/types.h> #include <des/softdes.h> @@ -78,8 +75,8 @@ #endif /* def CRYPT */ -static void des_setkey(u_char [8], struct deskeydata *, unsigned); -static void des_encrypt(u_char *, struct deskeydata *); +static void des_setkey(uchar_t [8], struct deskeydata *, unsigned); +static void des_encrypt(uchar_t *, struct deskeydata *); #ifndef _KERNEL /* @@ -136,8 +133,8 @@ __des_crypt(char *buf, unsigned int len, struct desparams *desp) char nextiv[8]; struct deskeydata softkey; - mode = (unsigned) desp->des_mode; - dir = (unsigned) desp->des_dir; + mode = (unsigned)desp->des_mode; + dir = (unsigned)desp->des_dir; des_setkey(desp->des_key, &softkey, dir); while (len != 0) { switch (mode) { @@ -146,14 +143,14 @@ __des_crypt(char *buf, unsigned int len, struct desparams *desp) case ENCRYPT: for (i = 0; i < 8; i++) buf[i] ^= desp->des_ivec[i]; - des_encrypt((u_char *)buf, &softkey); + des_encrypt((uchar_t *)buf, &softkey); for (i = 0; i < 8; i++) desp->des_ivec[i] = buf[i]; break; case DECRYPT: for (i = 0; i < 8; i++) nextiv[i] = buf[i]; - des_encrypt((u_char *)buf, &softkey); + des_encrypt((uchar_t *)buf, &softkey); for (i = 0; i < 8; i++) { buf[i] ^= desp->des_ivec[i]; desp->des_ivec[i] = nextiv[i]; @@ -162,7 +159,7 @@ __des_crypt(char *buf, unsigned int len, struct desparams *desp) } break; case ECB: - des_encrypt((u_char *)buf, &softkey); + des_encrypt((uchar_t *)buf, &softkey); break; } buf += 8; @@ -178,7 +175,7 @@ __des_crypt(char *buf, unsigned int len, struct desparams *desp) * We build the 16 key entries here */ static void -des_setkey(u_char userkey[8], struct deskeydata *kd, unsigned int dir) +des_setkey(uchar_t userkey[8], struct deskeydata *kd, unsigned int dir) { /* EXPORT DELETE START */ long C, D; @@ -261,7 +258,6 @@ des_setkey(u_char userkey[8], struct deskeydata *kd, unsigned int dir) } /* EXPORT DELETE END */ - return; } @@ -274,7 +270,7 @@ des_setkey(u_char userkey[8], struct deskeydata *kd, unsigned int dir) * processor byte-order independence. */ static void -des_encrypt(u_char *data, struct deskeydata *kd) +des_encrypt(uchar_t *data, struct deskeydata *kd) { /* EXPORT DELETE START */ chunk_t work1, work2; @@ -339,9 +335,13 @@ des_encrypt(u_char *data, struct deskeydata *kd) chunk_t R, ER; \ uint32_t e0, e1; \ R.long0 = inR; \ + /* CSTYLED */ \ do_R_to_ER(=, 0); \ + /* CSTYLED */ \ do_R_to_ER(|=, 1); \ + /* CSTYLED */ \ do_R_to_ER(|=, 2); \ + /* CSTYLED */ \ do_R_to_ER(|=, 3); \ ER.long0 = e0 ^ kd->keyval[iter].long0; \ ER.long1 = e1 ^ kd->keyval[iter].long1; \ @@ -442,6 +442,5 @@ des_encrypt(u_char *data, struct deskeydata *kd) data[7] = work2.byte7; /* EXPORT DELETE END */ - return; } #endif /* def CRYPT */ diff --git a/usr/src/lib/libcrypt/inc/des_soft.h b/usr/src/lib/libcrypt/inc/des_soft.h index 85a7a8d2dc..83e75665ee 100644 --- a/usr/src/lib/libcrypt/inc/des_soft.h +++ b/usr/src/lib/libcrypt/inc/des_soft.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,9 +18,10 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1997,2001 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #ifndef _DES_SOFT_H @@ -38,7 +38,7 @@ extern "C" { extern int __des_crypt(char *, unsigned int, struct desparams *); extern int crypt_close_nolock(int p[2]); extern void des_encrypt1(); -extern void des_decrypt1(); +extern void _des_decrypt1(); #ifdef __cplusplus } diff --git a/usr/src/lib/libcurses/screen/_curs_gettext.h b/usr/src/lib/libcurses/screen/_curs_gettext.h index ac2609b07d..e969d06270 100644 --- a/usr/src/lib/libcurses/screen/_curs_gettext.h +++ b/usr/src/lib/libcurses/screen/_curs_gettext.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,9 +18,10 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1990, 1997, by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #ifndef _CURS_GETTEXT_H @@ -29,17 +29,18 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include <libintl.h> + #ifdef __cplusplus extern "C" { #endif /* Header file for _curs_gettext() macro. */ #if !defined(TEXT_DOMAIN) /* Should be defined thru -D flag. */ -# define TEXT_DOMAIN "SYS_TEST" +#define TEXT_DOMAIN "SYS_TEST" #endif -char *_dgettext(const char *, const char *); -#define _curs_gettext(msg_id) _dgettext(TEXT_DOMAIN, msg_id) +#define _curs_gettext(msg_id) dgettext(TEXT_DOMAIN, msg_id) #ifdef __cplusplus } diff --git a/usr/src/lib/libcurses/screen/mbstowcs.c b/usr/src/lib/libcurses/screen/mbstowcs.c index 688e83a02e..fd6a0584cb 100644 --- a/usr/src/lib/libcurses/screen/mbstowcs.c +++ b/usr/src/lib/libcurses/screen/mbstowcs.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,19 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -/*LINTLIBRARY*/ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <widec.h> #include <sys/types.h> #include <stdlib.h> diff --git a/usr/src/lib/libcurses/screen/mbtowc.c b/usr/src/lib/libcurses/screen/mbtowc.c index fd19039f83..1951a0f5ac 100644 --- a/usr/src/lib/libcurses/screen/mbtowc.c +++ b/usr/src/lib/libcurses/screen/mbtowc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,19 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -/*LINTLIBRARY*/ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <widec.h> #include <ctype.h> #include <sys/types.h> diff --git a/usr/src/lib/libeti/menu/Makefile.com b/usr/src/lib/libeti/menu/Makefile.com index 974b465c5e..14eeb40cfa 100644 --- a/usr/src/lib/libeti/menu/Makefile.com +++ b/usr/src/lib/libeti/menu/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -77,7 +77,7 @@ LDLIBS += -lcurses -lc .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libeti/panel/Makefile.com b/usr/src/lib/libeti/panel/Makefile.com index 21f886f639..4baeb2867d 100644 --- a/usr/src/lib/libeti/panel/Makefile.com +++ b/usr/src/lib/libeti/panel/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -53,7 +53,7 @@ LDLIBS += -lcurses -lc .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libfruutils/Makefile.com b/usr/src/lib/libfruutils/Makefile.com index 25b526178d..57e808d073 100644 --- a/usr/src/lib/libfruutils/Makefile.com +++ b/usr/src/lib/libfruutils/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -57,7 +57,7 @@ $(LINTLIB) := LINTFLAGS64 = -nvx -Xarch=$(MACH64:sparcv9=v9) .KEEP_STATE: -all : $(LIBS) fnamecheck +all : $(LIBS) $(CHMOD) 755 $(DYNLIB) lint : diff --git a/usr/src/lib/libgen/Makefile.com b/usr/src/lib/libgen/Makefile.com index 07e8fc6b27..4eecda06a7 100644 --- a/usr/src/lib/libgen/Makefile.com +++ b/usr/src/lib/libgen/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -49,7 +49,7 @@ CPPFLAGS += -D_REENTRANT -D_LARGEFILE64_SOURCE -I../inc -I../../common/inc .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libgen/common/bgets.c b/usr/src/lib/libgen/common/bgets.c index 19305b372c..75e38da954 100644 --- a/usr/src/lib/libgen/common/bgets.c +++ b/usr/src/lib/libgen/common/bgets.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -36,9 +36,6 @@ * NOTE: This function will not work for multi-byte characters. */ -#pragma weak bgets = _bgets - -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <stdio.h> @@ -86,8 +83,8 @@ bgets(char *buf, size_t count, FILE *fp, char *stopstr) static thread_key_t key = THR_ONCE_KEY; char *stop = _get_stop(&key); #else /* _REENTRANT */ - if (! stop) - stop = (char *)calloc(CHARS, sizeof (char)); + if (!stop) + stop = (char *)calloc(CHARS, sizeof (char)); else #endif /* _REENTRANT */ if (stopstr) /* reset stopstr array */ diff --git a/usr/src/lib/libgen/common/bufsplit.c b/usr/src/lib/libgen/common/bufsplit.c index d1ae2ce68d..96bffaad1e 100644 --- a/usr/src/lib/libgen/common/bufsplit.c +++ b/usr/src/lib/libgen/common/bufsplit.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,9 +40,6 @@ * pointers is only valid while the buffer is intact. */ -#pragma weak bufsplit = _bufsplit - -#include "gen_synonyms.h" #include <sys/types.h> #include <stdlib.h> #include <string.h> diff --git a/usr/src/lib/libgen/common/copylist.c b/usr/src/lib/libgen/common/copylist.c index 10153bb06d..33d0da3018 100644 --- a/usr/src/lib/libgen/common/copylist.c +++ b/usr/src/lib/libgen/common/copylist.c @@ -19,30 +19,21 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.1.3.2 */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -/*LINTLIBRARY*/ +#pragma ident "%Z%%M% %I% %E% SMI" /* * copylist copies a file into a block of memory, replacing newlines * with null characters, and returns a pointer to the copy. */ -#include <sys/feature_tests.h> -#ifndef _LP64 -#pragma weak copylist64 = _copylist64 -#endif -#pragma weak copylist = _copylist - -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <stdlib.h> @@ -87,7 +78,7 @@ common_copylist(const char *filenm, off64_t size) #ifndef _LP64 char * -_copylist64(const char *filenm, off64_t *szptr) +copylist64(const char *filenm, off64_t *szptr) { struct stat64 stbuf; @@ -103,7 +94,7 @@ _copylist64(const char *filenm, off64_t *szptr) char * -_copylist(const char *filenm, off_t *szptr) +copylist(const char *filenm, off_t *szptr) { struct stat64 stbuf; diff --git a/usr/src/lib/libgen/common/eaccess.c b/usr/src/lib/libgen/common/eaccess.c index d7afcc124e..018853fbe9 100644 --- a/usr/src/lib/libgen/common/eaccess.c +++ b/usr/src/lib/libgen/common/eaccess.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,26 +19,21 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -/*LINTLIBRARY*/ +#pragma ident "%Z%%M% %I% %E% SMI" /* * Determine if the effective user id has the appropriate permission * on a file. */ -#pragma weak eaccess = _eaccess - -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <unistd.h> diff --git a/usr/src/lib/libgen/common/gmatch.c b/usr/src/lib/libgen/common/gmatch.c index dc47f7ec3f..3f906f6a4a 100644 --- a/usr/src/lib/libgen/common/gmatch.c +++ b/usr/src/lib/libgen/common/gmatch.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,21 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.1.5.2 */ - -/*LINTLIBRARY*/ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak gmatch = _gmatch +#pragma ident "%Z%%M% %I% %E% SMI" -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <stdlib.h> @@ -47,7 +41,7 @@ c = cl; \ if (n <= 0) \ return (0); \ - p += n; + p += n int gmatch(const char *s, const char *p) @@ -88,13 +82,13 @@ gmatch(const char *s, const char *p) notflag = 1; p++; } - Popwchar(p, c) + Popwchar(p, c); do { if (c == '-' && lc && *p != ']') { - Popwchar(p, c) + Popwchar(p, c); if (c == '\\') { - Popwchar(p, c) + Popwchar(p, c); } if (notflag) { if (!multibyte || @@ -113,7 +107,7 @@ gmatch(const char *s, const char *p) } } else if (c == '\\') { /* skip to quoted character */ - Popwchar(p, c) + Popwchar(p, c); } lc = c; if (notflag) { @@ -127,14 +121,14 @@ gmatch(const char *s, const char *p) if (scc == lc) ok++; } - Popwchar(p, c) + Popwchar(p, c); } while (c != ']'); return (ok ? gmatch(s, p) : 0); } case '\\': /* skip to quoted character and see if it matches */ - Popwchar(p, c) + Popwchar(p, c); default: if (c != scc) diff --git a/usr/src/lib/libgen/common/isencrypt.c b/usr/src/lib/libgen/common/isencrypt.c index e056e37a96..61c1f40f31 100644 --- a/usr/src/lib/libgen/common/isencrypt.c +++ b/usr/src/lib/libgen/common/isencrypt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,21 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" - -/*LINTLIBRARY*/ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak isencrypt = _isencrypt +#pragma ident "%Z%%M% %I% %E% SMI" -#include "gen_synonyms.h" #include <sys/types.h> #include <locale.h> #include <string.h> diff --git a/usr/src/lib/libgen/common/mapfile-vers b/usr/src/lib/libgen/common/mapfile-vers index 9bfec93dfe..9fdbb18725 100644 --- a/usr/src/lib/libgen/common/mapfile-vers +++ b/usr/src/lib/libgen/common/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -68,36 +68,9 @@ SUNW_1.1 { SUNWprivate_1.1 { global: - _bgets; - _braelist; - _braslist; - _bufsplit; - _compile; - _copylist; - _eaccess; - _gmatch; - _isencrypt; - _loc1; - _loc2; - _locs; - _mkdirp; - _nbra; - _p2close; - __p2close; - _p2open; - __p2open; - _pathfind; - _regerrno; - _reglength; - _rmdirp; - _step; - _strcadd; - _strccpy; - _streadd; - _strecpy; - _strfind; - _strrspn; - _strtrns; + _compile; # just for vi + __p2close; # just for libcrypt + __p2open; # just for libcrypt local: *; }; diff --git a/usr/src/lib/libgen/common/mapfile32-vers b/usr/src/lib/libgen/common/mapfile32-vers index 5c8e6d0e69..803024ad07 100644 --- a/usr/src/lib/libgen/common/mapfile32-vers +++ b/usr/src/lib/libgen/common/mapfile32-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -29,8 +29,3 @@ SUNW_1.1 { # largefiles interfaces for 32-bit applications global: copylist64; }; - -SUNWprivate_1.1 { - global: - _copylist64; -}; diff --git a/usr/src/lib/libgen/common/mkdirp.c b/usr/src/lib/libgen/common/mkdirp.c index 2960131130..9c81f2a0b8 100644 --- a/usr/src/lib/libgen/common/mkdirp.c +++ b/usr/src/lib/libgen/common/mkdirp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,17 +19,15 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak mkdirp = _mkdirp +#pragma ident "%Z%%M% %I% %E% SMI" /* * Creates directory and it's parents if the parents do not @@ -41,7 +38,6 @@ * Does NOT simplify pathnames with . or .. in them. */ -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <stdlib.h> @@ -153,7 +149,7 @@ simplify(const char *str) */ if (!str) - return (NULL); + return (NULL); /* * Get a copy of the argument. diff --git a/usr/src/lib/libgen/common/p2open.c b/usr/src/lib/libgen/common/p2open.c index 2ea018385c..f7c70d0e55 100644 --- a/usr/src/lib/libgen/common/p2open.c +++ b/usr/src/lib/libgen/common/p2open.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,16 +29,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" -/*LINTLIBRARY*/ - -#pragma weak p2open = _p2open -#pragma weak p2close = _p2close - /* * Similar to popen(3S) but with pipe to cmd's stdin and from stdout. */ -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <stdio.h> @@ -119,9 +112,7 @@ __p2close(int *fdp, FILE **fpp, int kill_sig) { int fds[2]; int status; - void (*hstat)(int), - (*istat)(int), - (*qstat)(int); + void (*hstat)(int), (*istat)(int), (*qstat)(int); pid_t pid, r; if (fdp != NULL) { diff --git a/usr/src/lib/libgen/common/pathfind.c b/usr/src/lib/libgen/common/pathfind.c index 8a0db847ae..8eb73781ae 100644 --- a/usr/src/lib/libgen/common/pathfind.c +++ b/usr/src/lib/libgen/common/pathfind.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,15 +29,12 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak pathfind = _pathfind - /* * Search the specified path for a file with the specified * mode and type. Return a pointer to the path. If the * file isn't found, return NULL. */ -#include "gen_synonyms.h" #ifdef _REENTRANT #include <thread.h> #include <pthread.h> @@ -163,20 +160,20 @@ pathfind(const char *path, const char *name, const char *mode) path = ":"; while (*path) { for (cp = cpath; (/* const */ char *) cp < - &cpath[PATH_MAX] && (*cp = *path); cp++) { + &cpath[PATH_MAX] && (*cp = *path); cp++) { path++; if (*cp == ':') break; } if ((/* const */ char *) cp + strlen(name) + 2 >= - &cpath[PATH_MAX]) + &cpath[PATH_MAX]) continue; if (cp != cpath) *cp++ = '/'; *cp = '\0'; (void) strcat(cp, name); if (access(cpath, imode&07) == 0 && - fullck(cpath, imode, nzflag)) + fullck(cpath, imode, nzflag)) return (cpath); } diff --git a/usr/src/lib/libgen/common/reg_compile.c b/usr/src/lib/libgen/common/reg_compile.c index 04dae9861e..03b52e3e70 100644 --- a/usr/src/lib/libgen/common/reg_compile.c +++ b/usr/src/lib/libgen/common/reg_compile.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,12 +29,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak nbra = _nbra -#pragma weak regerrno = _regerrno -#pragma weak reglength = _reglength -#pragma weak compile = __compile - -#include "gen_synonyms.h" #include <sys/types.h> #include <ctype.h> #include <limits.h> @@ -205,7 +199,7 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) for (;;) { if (ep >= endbuf) ERROR(50); - Popwchar + Popwchar; if (c != '*' && ((c != '\\') || (PEEKC() != '{'))) lastep = ep; if (c == '\0') { @@ -222,7 +216,7 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) case '*': if (lastep == 0 || *lastep == CBRA ||*lastep == CKET || - *lastep == CBRC || *lastep == CLET) + *lastep == CBRC || *lastep == CLET) goto defchar; *lastep |= STAR; continue; @@ -246,10 +240,10 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) ep[i] = 0; neg = 0; - Popwchar + Popwchar; if (c == '^') { neg = 1; - Popwchar + Popwchar; } if (multibyte) { if (neg) { @@ -266,7 +260,7 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) if (c == '\0') ERROR(49); if (c == '-' && lc != 0) { - Popwchar + Popwchar; if (c == '\0') ERROR(49); if (c == ']') { @@ -291,14 +285,14 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) lc = c; } else if (c == '\\' && (viflag & 1) && - strchr("\\^-]", PEEKC())) { + strchr("\\^-]", PEEKC())) { c = GETC(); lc = c; } else lc = c; /* put eight bit characters into bitmap */ if (!multibyte || c <= 0177 || c <= 0377 && - iscntrl((int)c)) + iscntrl((int)c)) PLACE(c); else { /* @@ -311,7 +305,7 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) while (n--) *start++ = *oldsp++; } - Popwchar + Popwchar; } while (c != ']'); if (neg) { @@ -334,7 +328,7 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) continue; case '\\': - Popwchar + Popwchar; switch (c) { case '(': @@ -385,7 +379,7 @@ _compile(const char *sp, char *ep, char *endbuf, int viflag) *ep++ = (char)i; else if ((int)(unsigned char)ep[-1] < - (int)(unsigned char)ep[-2]) + (int)(unsigned char)ep[-2]) ERROR(46); continue; diff --git a/usr/src/lib/libgen/common/reg_step.c b/usr/src/lib/libgen/common/reg_step.c index 3e164e8d3d..f07d9029b6 100644 --- a/usr/src/lib/libgen/common/reg_step.c +++ b/usr/src/lib/libgen/common/reg_step.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,15 +29,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak loc1 = _loc1 -#pragma weak loc2 = _loc2 -#pragma weak locs = _locs -#pragma weak braelist = _braelist -#pragma weak braslist = _braslist -#pragma weak step = _step -#pragma weak advance = _radvance - -#include "gen_synonyms.h" #include <sys/types.h> #include <ctype.h> #include <stdlib.h> @@ -515,16 +506,16 @@ _advance(char *lp, char *ep) c = (unsigned char)*lp; d = (unsigned char)*(lp-1); if ((isdigit((int)c) || uletter((int)c) || c >= 0200 && - MB_CUR_MAX > 1) && !isdigit((int)d) && - !uletter((int)d) && - (d < 0200 || MB_CUR_MAX == 1)) + MB_CUR_MAX > 1) && !isdigit((int)d) && + !uletter((int)d) && + (d < 0200 || MB_CUR_MAX == 1)) continue; return (0); case CLET: d = (unsigned char)*lp; if (!isdigit((int)d) && !uletter((int)d) && (d < 0200 || - MB_CUR_MAX == 1)) + MB_CUR_MAX == 1)) continue; return (0); @@ -548,10 +539,10 @@ mstar: /* back up appropriate number of bytes */ if ((unsigned char)*lp >= 0200) { if (p1 >= curlp && - (unsigned char)*p1 == SS2) + (unsigned char)*p1 == SS2) lp = p1; else if (p2 >= curlp && - (unsigned char)*p2 == SS3) + (unsigned char)*p2 == SS3) lp = p2; else lp = lp - eucw1 + 1; diff --git a/usr/src/lib/libgen/common/rmdirp.c b/usr/src/lib/libgen/common/rmdirp.c index d315cde4b6..f485164d17 100644 --- a/usr/src/lib/libgen/common/rmdirp.c +++ b/usr/src/lib/libgen/common/rmdirp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,19 +19,15 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.5.3.2 */ - -/*LINTLIBRARY*/ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak rmdirp = _rmdirp +#pragma ident "%Z%%M% %I% %E% SMI" /* * rmdirp() removes directories in path "d". Removal starts from the @@ -47,7 +42,6 @@ * returns -3 if removal stops because it's the current directory. */ -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <sys/stat.h> diff --git a/usr/src/lib/libgen/common/strccpy.c b/usr/src/lib/libgen/common/strccpy.c index 3be9d62a57..7b18a0e385 100644 --- a/usr/src/lib/libgen/common/strccpy.c +++ b/usr/src/lib/libgen/common/strccpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,22 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.2.5.2 */ - -/*LINTLIBRARY*/ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak strccpy = _strccpy -#pragma weak strcadd = _strcadd +#pragma ident "%Z%%M% %I% %E% SMI" -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> diff --git a/usr/src/lib/libgen/common/strecpy.c b/usr/src/lib/libgen/common/strecpy.c index dd980d9c6a..b5756a4e85 100644 --- a/usr/src/lib/libgen/common/strecpy.c +++ b/usr/src/lib/libgen/common/strecpy.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,22 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.2.5.2 */ - -/*LINTLIBRARY*/ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak strecpy = _strecpy -#pragma weak streadd = _streadd +#pragma ident "%Z%%M% %I% %E% SMI" -#include "gen_synonyms.h" #include <sys/types.h> #include <libgen.h> #include <ctype.h> diff --git a/usr/src/lib/libgen/common/strfind.c b/usr/src/lib/libgen/common/strfind.c index 7b09616979..a4b2ef1b4b 100644 --- a/usr/src/lib/libgen/common/strfind.c +++ b/usr/src/lib/libgen/common/strfind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,21 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.1.2.2 */ - -/*LINTLIBRARY*/ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak strfind = _strfind +#pragma ident "%Z%%M% %I% %E% SMI" -#include "gen_synonyms.h" #include <sys/types.h> /* diff --git a/usr/src/lib/libgen/common/strrspn.c b/usr/src/lib/libgen/common/strrspn.c index 25acddf2f0..043d1e727a 100644 --- a/usr/src/lib/libgen/common/strrspn.c +++ b/usr/src/lib/libgen/common/strrspn.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,21 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.1.2.2 */ - -/*LINTLIBRARY*/ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#pragma weak strrspn = _strrspn +#pragma ident "%Z%%M% %I% %E% SMI" -#include "gen_synonyms.h" #include <sys/types.h> #include <string.h> diff --git a/usr/src/lib/libgen/common/strtrns.c b/usr/src/lib/libgen/common/strtrns.c index 6f22100bf6..e145ef869c 100644 --- a/usr/src/lib/libgen/common/strtrns.c +++ b/usr/src/lib/libgen/common/strtrns.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,21 +19,15 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.1.2.2 */ - -/*LINTLIBRARY*/ - -#pragma weak strtrns = _strtrns +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ -#include "gen_synonyms.h" +#pragma ident "%Z%%M% %I% %E% SMI" /* * Copy `str' to `result' replacing any character found diff --git a/usr/src/lib/libldap4/include/ldap-private.h b/usr/src/lib/libldap4/include/ldap-private.h index 19807f234c..8cddace292 100644 --- a/usr/src/lib/libldap4/include/ldap-private.h +++ b/usr/src/lib/libldap4/include/ldap-private.h @@ -1,5 +1,5 @@ /* - * Copyright 1995-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -11,10 +11,10 @@ #include <signal.h> #include <pthread.h> /* rri */ -#define pthread_self _thr_self -#define thr_self _thr_self -#define pthread_kill _thr_kill -#define thr_kill _thr_kill +#define pthread_self thr_self +#define thr_self thr_self +#define pthread_kill thr_kill +#define thr_kill thr_kill #ifdef _REENTRANT #ifndef MAX_THREAD_ID @@ -37,19 +37,19 @@ #endif /* LDAP_DNS */ /* -#define DBG_LOCK1(st) printf("%d> %s %d:%s\n", _thr_self(), st, __LINE__, __FILE__); -#define DBG_LOCK2(ld,st) printf("%d> %s ld_lockcount=%d %d:%s\n", _thr_self(), st, (ld)->ld_lockcount, __LINE__, __FILE__); +#define DBG_LOCK1(st) printf("%d> %s %d:%s\n", thr_self(), st, __LINE__, __FILE__); +#define DBG_LOCK2(ld,st) printf("%d> %s ld_lockcount=%d %d:%s\n", thr_self(), st, (ld)->ld_lockcount, __LINE__, __FILE__); */ #define DBG_LOCK1(st) #define DBG_LOCK2(ld,st) -extern pthread_t _thr_self(); +extern pthread_t thr_self(); #define LOCK_RESPONSE(ld) \ - if ((ld)->ld_response_lockthread != _thr_self()) { \ + if ((ld)->ld_response_lockthread != thr_self()) { \ DBG_LOCK1("waiting for response lock") \ pthread_mutex_lock( &((ld)->ld_response_mutex) ); \ DBG_LOCK1("got response lock") \ - (ld)->ld_response_lockthread = _thr_self(); \ + (ld)->ld_response_lockthread = thr_self(); \ } else { \ (ld)->ld_response_lockcount++; \ DBG_LOCK2(ld, "fake ldap lock") \ @@ -66,11 +66,11 @@ extern pthread_t _thr_self(); } #define LOCK_LDAP(ld) \ - if ((ld)->ld_lockthread != _thr_self()) { \ + if ((ld)->ld_lockthread != thr_self()) { \ DBG_LOCK1("waiting for ldap lock") \ pthread_mutex_lock( &((ld)->ld_ldap_mutex) ); \ DBG_LOCK1("got ldap lock") \ - (ld)->ld_lockthread = _thr_self(); \ + (ld)->ld_lockthread = thr_self(); \ } else { \ (ld)->ld_lockcount++; \ DBG_LOCK2(ld, "fake ldap lock") \ diff --git a/usr/src/lib/liblgrp/Makefile.com b/usr/src/lib/liblgrp/Makefile.com index cdeb2e54a1..b19521f398 100644 --- a/usr/src/lib/liblgrp/Makefile.com +++ b/usr/src/lib/liblgrp/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -46,7 +46,7 @@ $(LINTLIB) := SRCS = ../common/llib-llgrp .KEEP_STATE: -all : $(LIBS) fnamecheck +all : $(LIBS) lint : lintcheck diff --git a/usr/src/lib/liblm/Makefile.com b/usr/src/lib/liblm/Makefile.com index 22d8865d56..2dd2f08bb7 100644 --- a/usr/src/lib/liblm/Makefile.com +++ b/usr/src/lib/liblm/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,7 +44,7 @@ LDLIBS += -lc .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libmail/Makefile.com b/usr/src/lib/libmail/Makefile.com index e8233c7616..4c384da5c2 100644 --- a/usr/src/lib/libmail/Makefile.com +++ b/usr/src/lib/libmail/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -51,7 +51,7 @@ LDLIBS += -lc .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libmail/common/abspath.c b/usr/src/lib/libmail/common/abspath.c index 9f2bfae895..644772ea01 100644 --- a/usr/src/lib/libmail/common/abspath.c +++ b/usr/src/lib/libmail/common/abspath.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,16 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ + /* * NAME * abspath - expand a path relative to some `.' @@ -43,7 +42,6 @@ * returned in "to". Otherwise, the value of "path" is * returned in "to". */ -#include "c_synonyms.h" #include "libmail.h" #include <sys/types.h> diff --git a/usr/src/lib/libmail/common/casncmp.c b/usr/src/lib/libmail/common/casncmp.c index 18a61eaf23..fc56d228ef 100644 --- a/usr/src/lib/libmail/common/casncmp.c +++ b/usr/src/lib/libmail/common/casncmp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,16 +19,15 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ /* * NAME @@ -43,7 +41,6 @@ * Stop after n bytes or the trailing NUL. */ -#include "c_synonyms.h" #include "libmail.h" #include <ctype.h> #include <sys/types.h> diff --git a/usr/src/lib/libmail/common/copystream.c b/usr/src/lib/libmail/common/copystream.c index eb92f738bb..cdedd71382 100644 --- a/usr/src/lib/libmail/common/copystream.c +++ b/usr/src/lib/libmail/common/copystream.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,34 +19,32 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ /* - NAME - copystream - copy one FILE stream to another - - SYNOPSIS - int copystream(FILE *infp, FILE *outfp) - - DESCRIPTION - copystream() copies one stream to another. The stream - infp must be opened for reading and the stream outfp - must be opened for writing. - - It returns true if the stream is successively copied; - false if any writes fail. -*/ + * NAME + * copystream - copy one FILE stream to another + * + * SYNOPSIS + * int copystream(FILE *infp, FILE *outfp) + * + * DESCRIPTION + * copystream() copies one stream to another. The stream + * infp must be opened for reading and the stream outfp + * must be opened for writing. + * + * It returns true if the stream is successively copied; + * false if any writes fail. + */ -#include "c_synonyms.h" #include "libmail.h" #include <sys/types.h> diff --git a/usr/src/lib/libmail/common/delempty.c b/usr/src/lib/libmail/common/delempty.c index 49748593da..266b33b39b 100644 --- a/usr/src/lib/libmail/common/delempty.c +++ b/usr/src/lib/libmail/common/delempty.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,16 +19,15 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ /* * NAME @@ -45,7 +43,6 @@ * on the mode]. */ -#include "c_synonyms.h" #include "libmail.h" #include <sys/types.h> #include <unistd.h> diff --git a/usr/src/lib/libmail/common/getdomain.c b/usr/src/lib/libmail/common/getdomain.c index fc66e7f59c..6eada87322 100644 --- a/usr/src/lib/libmail/common/getdomain.c +++ b/usr/src/lib/libmail/common/getdomain.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include "libmail.h" #include <sys/types.h> #include <ctype.h> @@ -122,7 +119,7 @@ maildomain(void) /* if we've already been here, return the info */ if (domain != 0) - return (domain); + return (domain); domain = readdomain(dombuf+1, NMLN); diff --git a/usr/src/lib/libmail/common/maillock.c b/usr/src/lib/libmail/common/maillock.c index 6a0140620a..283e6b7472 100644 --- a/usr/src/lib/libmail/common/maillock.c +++ b/usr/src/lib/libmail/common/maillock.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include "maillock.h" #include <sys/types.h> #include <fcntl.h> diff --git a/usr/src/lib/libmail/common/notifyu.c b/usr/src/lib/libmail/common/notifyu.c index b4cb0ec119..9d4b7d4694 100644 --- a/usr/src/lib/libmail/common/notifyu.c +++ b/usr/src/lib/libmail/common/notifyu.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.4 */ -/*LINTLIBRARY*/ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include "libmail.h" #include <sys/types.h> #include <sys/stat.h> diff --git a/usr/src/lib/libmail/common/popenvp.c b/usr/src/lib/libmail/common/popenvp.c index 632c94de0f..a8c6faab76 100644 --- a/usr/src/lib/libmail/common/popenvp.c +++ b/usr/src/lib/libmail/common/popenvp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,16 +19,15 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ /* * These routines are based on the standard UNIX stdio popen/pclose @@ -42,7 +40,6 @@ * quotes, etc. */ -#include "c_synonyms.h" #include <sys/types.h> #include <assert.h> #include <string.h> @@ -113,9 +110,9 @@ pclosevp(FILE *ptr) istat = signal(SIGINT, SIG_IGN); qstat = signal(SIGQUIT, SIG_IGN); hstat = signal(SIGHUP, SIG_IGN); - do + do { r = wait(&status); - while (r != popen_pid[f] && r != (pid_t)-1); + } while (r != popen_pid[f] && r != (pid_t)-1); if (r == (pid_t)-1) status = -1; diff --git a/usr/src/lib/libmail/common/s_string.c b/usr/src/lib/libmail/common/s_string.c index 5654f03eca..a57889d96a 100644 --- a/usr/src/lib/libmail/common/s_string.c +++ b/usr/src/lib/libmail/common/s_string.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include <sys/types.h> #include <stdio.h> #include <ctype.h> @@ -232,7 +229,8 @@ s_seq_read(FILE *fp, string *to, int lineortoken) return (NULL); case '#': /*LINTED*/ - while ((c = getc(fp)) != '\n' && c != EOF); + while ((c = getc(fp)) != '\n' && c != EOF) + continue; break; case ' ': case '\t': diff --git a/usr/src/lib/libmail/common/setup_exec.c b/usr/src/lib/libmail/common/setup_exec.c index b0efc3454e..f7fdfb3e45 100644 --- a/usr/src/lib/libmail/common/setup_exec.c +++ b/usr/src/lib/libmail/common/setup_exec.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include <sys/types.h> #include <ctype.h> #include "libmail.h" @@ -57,7 +54,7 @@ setup_exec(char *s) q = p; stop = FALSE; while (*q && (stop == FALSE)) { - again: + again: switch (*q) { case '\\': /* Slide command string 1 char to left */ @@ -65,7 +62,7 @@ setup_exec(char *s) break; case '"': ignorespace = ((ignorespace == TRUE) ? - FALSE : TRUE); + FALSE : TRUE); /* Slide command string 1 char to left */ strmove(q, q+1); goto again; diff --git a/usr/src/lib/libmail/common/skipspace.c b/usr/src/lib/libmail/common/skipspace.c index cbbc151852..2d44d22510 100644 --- a/usr/src/lib/libmail/common/skipspace.c +++ b/usr/src/lib/libmail/common/skipspace.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include <sys/types.h> #include "libmail.h" #include <ctype.h> diff --git a/usr/src/lib/libmail/common/strmove.c b/usr/src/lib/libmail/common/strmove.c index bb82e42c34..10079520f5 100644 --- a/usr/src/lib/libmail/common/strmove.c +++ b/usr/src/lib/libmail/common/strmove.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include <sys/types.h> #include "libmail.h" diff --git a/usr/src/lib/libmail/common/substr.c b/usr/src/lib/libmail/common/substr.c index e2589974fa..97ad4e90bf 100644 --- a/usr/src/lib/libmail/common/substr.c +++ b/usr/src/lib/libmail/common/substr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include <sys/types.h> #include "libmail.h" @@ -51,7 +48,8 @@ substr(char *string1, char *string2) /*LINTED*/ len2 = (int)strlen(string2); for (i = 0; i < len1 - len2 + 1; i++) { - for (j = 0; j < len2 && string1[i+j] == string2[j]; j++); + for (j = 0; j < len2 && string1[i+j] == string2[j]; j++) + continue; if (j == len2) return (i); } diff --git a/usr/src/lib/libmail/common/systemvp.c b/usr/src/lib/libmail/common/systemvp.c index 4fb23af800..81f97e9c26 100644 --- a/usr/src/lib/libmail/common/systemvp.c +++ b/usr/src/lib/libmail/common/systemvp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,14 +19,14 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + /* * These routines are based on the standard UNIX stdio popen/pclose * routines. This version takes an argv[][] argument instead of a string @@ -40,9 +39,7 @@ */ #pragma ident "%Z%%M% %I% %E% SMI" -/*LINTLIBRARY*/ -#include "c_synonyms.h" #include <sys/types.h> #include "libmail.h" #include <signal.h> @@ -66,9 +63,9 @@ systemvp(char *file, char **argv, int resetid) } istat = signal(SIGINT, SIG_IGN); qstat = signal(SIGQUIT, SIG_IGN); - do + do { w = wait(&status); - while (w != pid && w != (pid_t)-1); + } while (w != pid && w != (pid_t)-1); (void) signal(SIGINT, istat); (void) signal(SIGQUIT, qstat); return ((w == (pid_t)-1)? w: (pid_t)status); diff --git a/usr/src/lib/libmail/common/trimnl.c b/usr/src/lib/libmail/common/trimnl.c index 4f09d69036..c6bd0eb5e0 100644 --- a/usr/src/lib/libmail/common/trimnl.c +++ b/usr/src/lib/libmail/common/trimnl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,18 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 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" /* SVr4.0 1.3 */ -/*LINTLIBRARY*/ +/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ +/* All Rights Reserved */ + +#pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <sys/types.h> #include "libmail.h" #include <string.h> diff --git a/usr/src/lib/libmail/common/xgetenv.c b/usr/src/lib/libmail/common/xgetenv.c index 5197a85d17..e29b7221a2 100644 --- a/usr/src/lib/libmail/common/xgetenv.c +++ b/usr/src/lib/libmail/common/xgetenv.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,16 +19,15 @@ * CDDL HEADER END */ -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" -/*LINTLIBRARY*/ /* * NAME @@ -66,7 +64,6 @@ * These values may be adjusted below. */ -#include "c_synonyms.h" #include <sys/types.h> #include "libmail.h" #include <stdio.h> diff --git a/usr/src/lib/libmalloc/common/malloc.c b/usr/src/lib/libmalloc/common/malloc.c index aa14755752..1d2bbef56b 100644 --- a/usr/src/lib/libmalloc/common/malloc.c +++ b/usr/src/lib/libmalloc/common/malloc.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -29,7 +29,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include <c_synonyms.h> #include <sys/types.h> #ifndef debug @@ -206,7 +205,7 @@ memalign(size_t alignment, size_t size) static int realloc; if (size == 0 || alignment == 0 || - (alignment & (alignment - 1)) != 0) { + (alignment & (alignment - 1)) != 0) { return (NULL); } if (alignment <= ALIGNSZ) @@ -838,7 +837,6 @@ realloc_unlocked(void *ptr, size_t size) } -/* LINTLIBRARY */ /* * calloc - allocate and clear memory block */ @@ -930,7 +928,7 @@ mallopt(int cmd, int value) break; case M_KEEP: if (change && holdhead != NULL) { - mutex_unlock(&mlock); + (void) mutex_unlock(&mlock); return (1); } minhead = HEADSZ; diff --git a/usr/src/lib/libmapmalloc/common/calloc.c b/usr/src/lib/libmapmalloc/common/calloc.c index d14cac713c..d654abd77d 100644 --- a/usr/src/lib/libmapmalloc/common/calloc.c +++ b/usr/src/lib/libmapmalloc/common/calloc.c @@ -20,13 +20,12 @@ */ /* - * Copyright 2007 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" -#include <c_synonyms.h> #include <stdlib.h> #include <string.h> /* diff --git a/usr/src/lib/libmapmalloc/common/textmem.c b/usr/src/lib/libmapmalloc/common/textmem.c index 6a3f04cb1e..9c58ab5fb0 100644 --- a/usr/src/lib/libmapmalloc/common/textmem.c +++ b/usr/src/lib/libmapmalloc/common/textmem.c @@ -20,16 +20,14 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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" /* SVR4/MNLS 1.1.2.1 */ - -/*LINTLIBRARY*/ +#pragma ident "%Z%%M% %I% %E% SMI" #include <sys/types.h> @@ -48,7 +46,6 @@ * New memory chunks are allocated on a first-fit basis. * Freed blocks are joined in larger blocks. Free pages are unmapped. */ -#include <c_synonyms.h> #include <stdlib.h> #include <sys/types.h> #include <sys/mman.h> @@ -137,7 +134,7 @@ found: if ((page = (struct page *)mmap(0, totpage, PROT_READ|PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0)) - == MAP_FAILED) + == MAP_FAILED) return (0); page->next = memstart; @@ -253,7 +250,7 @@ defrag(struct page *page) if (block->status == BUSY) continue; for (block2 = block->next; block2 && block2->status == FREE; - block2 = block2->next) { + block2 = block2->next) { block->next = block2->next; block->size += block2->size + HDR_BLOCK; } @@ -268,7 +265,7 @@ defrag(struct page *page) else { struct page *page2; for (page2 = memstart; page2->next; - page2 = page2->next) { + page2 = page2->next) { if (page2->next == page) { page2->next = page->next; break; diff --git a/usr/src/lib/libmapmalloc/common/valloc.c b/usr/src/lib/libmapmalloc/common/valloc.c index 5858564a3a..484e7076cb 100644 --- a/usr/src/lib/libmapmalloc/common/valloc.c +++ b/usr/src/lib/libmapmalloc/common/valloc.c @@ -20,14 +20,12 @@ */ /* - * Copyright 2007 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" -/*LINTLIBRARY*/ -#include <c_synonyms.h> #include <stdlib.h> #include <errno.h> diff --git a/usr/src/lib/libmd/Makefile.com b/usr/src/lib/libmd/Makefile.com index 8a27118649..4eb79481c5 100644 --- a/usr/src/lib/libmd/Makefile.com +++ b/usr/src/lib/libmd/Makefile.com @@ -68,7 +68,7 @@ ROOTLINT= $(LINTSRC:%=$(ROOTLIBDIR)/%) .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libmtmalloc/common/mtmalloc.c b/usr/src/lib/libmtmalloc/common/mtmalloc.c index 6dd1970491..38663be6bd 100644 --- a/usr/src/lib/libmtmalloc/common/mtmalloc.c +++ b/usr/src/lib/libmtmalloc/common/mtmalloc.c @@ -20,13 +20,12 @@ */ /* - * Copyright 2007 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" -#include <c_synonyms.h> #include <mtmalloc.h> #include "mtmalloc_impl.h" #include <unistd.h> diff --git a/usr/src/lib/libnsl/Makefile.com b/usr/src/lib/libnsl/Makefile.com index f8fb91c187..213ef8cfb3 100644 --- a/usr/src/lib/libnsl/Makefile.com +++ b/usr/src/lib/libnsl/Makefile.com @@ -214,7 +214,7 @@ LINTFLAGS64 += -m -DPORTMAP .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) # Don't lint WRAPPERS as they are explicitly unclean SRCS= $(DES:%.o=../des/%.c) \ diff --git a/usr/src/lib/libnsl/common/llib-lnsl b/usr/src/lib/libnsl/common/llib-lnsl index 889d4bf1fa..2fa879635a 100644 --- a/usr/src/lib/libnsl/common/llib-lnsl +++ b/usr/src/lib/libnsl/common/llib-lnsl @@ -19,16 +19,16 @@ * CDDL HEADER END */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - /* - * Copyright 2006 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" +/* LINTLIBRARY */ +/* PROTOLIB1 */ + #include <sys/types.h> #include <thread.h> #include <synch.h> @@ -544,7 +544,7 @@ int t_sndrel(int); int t_sndudata(int, struct t_unitdata *); /* t_strerror.c */ -char *_t_strerror(int); +char *t_strerror(int); /* t_sync.c */ int t_sync(int); diff --git a/usr/src/lib/libnsl/common/mapfile-vers b/usr/src/lib/libnsl/common/mapfile-vers index 79acf8cd81..fb31b2b277 100644 --- a/usr/src/lib/libnsl/common/mapfile-vers +++ b/usr/src/lib/libnsl/common/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -28,7 +28,6 @@ SUNW_1.10 { # SunOS 5.11 (Solaris 11) global: inet_aton; - _inet_aton; } SUNW_1.9; SUNW_1.9 { # SunOS 5.10 (Solaris 10) @@ -625,7 +624,6 @@ SUNWprivate_1.1 { _switch_gethostbyname_r; t_errlist; tiusr_statetbl; - _t_strerror; _uncached_gethostbyaddr_r; _uncached_gethostbyname_r; usingypmap; diff --git a/usr/src/lib/libnsl/include/mt.h b/usr/src/lib/libnsl/include/mt.h index e81ef24ac9..88e56f3c03 100644 --- a/usr/src/lib/libnsl/include/mt.h +++ b/usr/src/lib/libnsl/include/mt.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -45,11 +44,6 @@ * their default actions (killing the process, stopping the process). */ -#include "c_synonyms.h" -#if !defined(__lint) /* libnsl synonyms */ -#define inet_aton _inet_aton -#define t_strerror _t_strerror -#endif #include <thread.h> #include <pthread.h> #include <signal.h> diff --git a/usr/src/lib/libnsl/nsl/tli_wrappers.c b/usr/src/lib/libnsl/nsl/tli_wrappers.c index 1f7548f542..1b3eb0f68e 100644 --- a/usr/src/lib/libnsl/nsl/tli_wrappers.c +++ b/usr/src/lib/libnsl/nsl/tli_wrappers.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,18 +20,12 @@ */ /* - * Copyright 2006 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" -/* - * Note: This weak symbol is probably not needed - * but it exists because it historically has. - */ -#pragma weak t_strerror = _t_strerror - #include "mt.h" #include <tiuser.h> #include <unistd.h> @@ -200,7 +193,7 @@ t_sndudata(int fd, struct t_unitdata *unitdata) } char * -_t_strerror(int errnum) +t_strerror(int errnum) { return (_tx_strerror(errnum, TX_TLI_API)); } diff --git a/usr/src/lib/libnsl/rpc/inet_ntoa.c b/usr/src/lib/libnsl/rpc/inet_ntoa.c index 1c8c133f20..f68ed15e39 100644 --- a/usr/src/lib/libnsl/rpc/inet_ntoa.c +++ b/usr/src/lib/libnsl/rpc/inet_ntoa.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -111,8 +111,6 @@ * Reentrant interface */ -#pragma weak inet_aton = _inet_aton - #include "mt.h" #include "rpc_mt.h" #include <errno.h> @@ -193,7 +191,7 @@ inet_aton(const char *cp, struct in_addr *addr) c = *++cp; } else if (base == 16 && isascii(c) && isxdigit(c)) { val = (val << 4) | - (c + 10 - (islower(c) ? 'a' : 'A')); + (c + 10 - (islower(c) ? 'a' : 'A')); c = *++cp; } else break; diff --git a/usr/src/lib/libnsl/saf/doconfig.c b/usr/src/lib/libnsl/saf/doconfig.c index db2b6c2bd7..66a788e885 100644 --- a/usr/src/lib/libnsl/saf/doconfig.c +++ b/usr/src/lib/libnsl/saf/doconfig.c @@ -20,15 +20,15 @@ */ /* - * Copyright 2006 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" - /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ +#pragma ident "%Z%%M% %I% %E% SMI" + #include "mt.h" #include <stdio.h> #include <string.h> @@ -50,8 +50,6 @@ #define NOWAIT 0 #define WAIT 1 -extern char **_environ; - static char *eatwhite(char *); static int doassign(char *); static int dopush(int, char *); @@ -480,8 +478,7 @@ dorun(char *p, int waitflg) /* stderr */ if (dup(0) != 2) return (-1); - (void) execle("/usr/bin/sh", "sh", "-c", - p, 0, _environ); + (void) execl("/usr/bin/sh", "sh", "-c", p, NULL); /* * if we get here, there is a problem - remember that * this is the child diff --git a/usr/src/lib/libproc/common/pr_door.c b/usr/src/lib/libproc/common/pr_door.c index 9a294d40f7..ad4a2de30c 100644 --- a/usr/src/lib/libproc/common/pr_door.c +++ b/usr/src/lib/libproc/common/pr_door.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,8 +39,8 @@ int pr_door_info(struct ps_prochandle *Pr, int did, door_info_t *di) { - sysret_t rval; /* return value from _door_info() */ - argdes_t argd[6]; /* arg descriptors for _door_info() */ + sysret_t rval; /* return value from door_info() */ + argdes_t argd[6]; /* arg descriptors for door_info() */ argdes_t *adp = &argd[0]; /* first argument */ int error; diff --git a/usr/src/lib/libpthread/amd64/mapfile-vers b/usr/src/lib/libpthread/amd64/mapfile-vers index a86ac2b27f..ec353c069d 100644 --- a/usr/src/lib/libpthread/amd64/mapfile-vers +++ b/usr/src/lib/libpthread/amd64/mapfile-vers @@ -1,13 +1,9 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -226,147 +225,29 @@ SUNW_0.9 { SUNWprivate_1.1 { global: - __pthread_min_stack = FUNCTION; _pthread_setcleanupinit = FUNCTION; - _pthread_rwlock_trywrlock = FUNCTION; _resume = FUNCTION; _resume_ret = FUNCTION; - _canceloff = FUNCTION; - _cancelon = FUNCTION; - __thr_door_unbind = FUNCTION; - __sigtimedwait = FUNCTION; thr_probe_setup = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; - _pthread_create = FUNCTION; - _pthread_join = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_once = FUNCTION; - _pthread_equal = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_getspecific = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_exit = FUNCTION; - _pthread_kill = FUNCTION; - _pthread_self = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_testcancel = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_attr_getscope = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_condattr_destroy = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _pthread_cond_init = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_mutex_trylock = FUNCTION; - _pthread_cond_destroy = FUNCTION; - _pthread_cond_wait = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; - _pthread_cond_signal = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _pthread_getconcurrency = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _pthread_rwlock_init = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; _fork = FUNCTION; - _fork1 = FUNCTION; _sigaction = FUNCTION; _sigprocmask = FUNCTION; - _sigwait = FUNCTION; _sigsuspend = FUNCTION; _sigsetjmp = FUNCTION; _siglongjmp = FUNCTION; _sleep = FUNCTION; _alarm = FUNCTION; _setitimer = FUNCTION; - _cond_broadcast = FUNCTION; - _cond_init = FUNCTION; - _cond_destroy = FUNCTION; - _cond_signal = FUNCTION; - _cond_timedwait = FUNCTION; - _cond_reltimedwait = FUNCTION; - _cond_wait = FUNCTION; _mutex_destroy = FUNCTION; _mutex_init = FUNCTION; - _mutex_trylock = FUNCTION; _mutex_unlock = FUNCTION; - _rw_rdlock = FUNCTION; - _rw_tryrdlock = FUNCTION; - _rw_trywrlock = FUNCTION; - _rw_unlock = FUNCTION; - _rw_wrlock = FUNCTION; - _rwlock_init = FUNCTION; - _sema_init = FUNCTION; _sema_destroy = FUNCTION; - _sema_post = FUNCTION; - _sema_trywait = FUNCTION; - _sema_wait = FUNCTION; - _thr_continue = FUNCTION; _thr_create = FUNCTION; - _thr_exit = FUNCTION; - _thr_getconcurrency = FUNCTION; - _thr_getprio = FUNCTION; _thr_getspecific = FUNCTION; _thr_join = FUNCTION; _thr_keycreate = FUNCTION; - _thr_kill = FUNCTION; _thr_self = FUNCTION; - _thr_setconcurrency = FUNCTION; - _thr_setprio = FUNCTION; _thr_setspecific = FUNCTION; - _thr_sigsetmask = FUNCTION; - _thr_suspend = FUNCTION; - _thr_yield = FUNCTION; _thr_main = FUNCTION; - _thr_min_stack = FUNCTION; - _thr_stksegment = FUNCTION; }; diff --git a/usr/src/lib/libpthread/i386/mapfile-vers b/usr/src/lib/libpthread/i386/mapfile-vers index 4a71e18565..f16e8d1488 100644 --- a/usr/src/lib/libpthread/i386/mapfile-vers +++ b/usr/src/lib/libpthread/i386/mapfile-vers @@ -1,13 +1,9 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -231,146 +230,28 @@ SUNW_0.9 { SUNWprivate_1.1 { global: _mutex_unlock = FUNCTION; - _cond_reltimedwait = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_cond_signal = FUNCTION; _thr_main = FUNCTION; - _pthread_join = FUNCTION; - _sema_wait = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; _siglongjmp = FUNCTION; - _canceloff = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _rw_rdlock = FUNCTION; _fork = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; - _pthread_cond_init = FUNCTION; - _pthread_rwlock_init = FUNCTION; - _thr_sigsetmask = FUNCTION; - _thr_min_stack = FUNCTION; - _pthread_once = FUNCTION; - _thr_continue = FUNCTION; - _pthread_condattr_destroy = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; _setitimer = FUNCTION; - _fork1 = FUNCTION; - _cancelon = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; - _rw_tryrdlock = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_equal = FUNCTION; _thr_create = FUNCTION; _sleep = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _thr_setconcurrency = FUNCTION; - _cond_init = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _rw_trywrlock = FUNCTION; _alarm = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _pthread_exit = FUNCTION; - _thr_exit = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _cond_destroy = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; _thr_setspecific = FUNCTION; - _rw_unlock = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; - _pthread_kill = FUNCTION; - _thr_getprio = FUNCTION; _resume = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _cond_signal = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; thr_probe_setup = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; _thr_keycreate = FUNCTION; - _rw_wrlock = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; - _pthread_self = FUNCTION; _thr_join = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _cond_wait = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _thr_kill = FUNCTION; - _rwlock_init = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; - __thr_door_unbind = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_attr_getscope = FUNCTION; _sigprocmask = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_getconcurrency = FUNCTION; - _pthread_mutex_trylock = FUNCTION; _thr_getspecific = FUNCTION; _mutex_destroy = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; _thr_self = FUNCTION; - _sema_init = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - __sigtimedwait = FUNCTION; _sigaction = FUNCTION; - __pthread_min_stack = FUNCTION; - _pthread_create = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; _mutex_init = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; - _pthread_cond_destroy = FUNCTION; - _cond_timedwait = FUNCTION; - _thr_setprio = FUNCTION; _sema_destroy = FUNCTION; - _pthread_rwlock_trywrlock = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _sigwait = FUNCTION; _resume_ret = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_testcancel = FUNCTION; - _thr_suspend = FUNCTION; - _sema_post = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_cond_wait = FUNCTION; - _thr_getconcurrency = FUNCTION; _sigsuspend = FUNCTION; _pthread_setcleanupinit = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _mutex_trylock = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _thr_yield = FUNCTION; - _sema_trywait = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _pthread_getspecific = FUNCTION; - _cond_broadcast = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; _sigsetjmp = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; - _thr_stksegment = FUNCTION; }; diff --git a/usr/src/lib/libpthread/sparc/mapfile-vers b/usr/src/lib/libpthread/sparc/mapfile-vers index 1c08c0b65a..5b33df6c0b 100644 --- a/usr/src/lib/libpthread/sparc/mapfile-vers +++ b/usr/src/lib/libpthread/sparc/mapfile-vers @@ -1,13 +1,9 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -230,147 +229,29 @@ SUNW_0.9 { SUNWprivate_1.1 { global: - __pthread_min_stack = FUNCTION; _pthread_setcleanupinit = FUNCTION; - _pthread_rwlock_trywrlock = FUNCTION; _resume = FUNCTION; _resume_ret = FUNCTION; - _canceloff = FUNCTION; - _cancelon = FUNCTION; - __thr_door_unbind = FUNCTION; - __sigtimedwait = FUNCTION; thr_probe_setup = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; - _pthread_create = FUNCTION; - _pthread_join = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_once = FUNCTION; - _pthread_equal = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_getspecific = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_exit = FUNCTION; - _pthread_kill = FUNCTION; - _pthread_self = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_testcancel = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_attr_getscope = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_condattr_destroy = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _pthread_cond_init = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_mutex_trylock = FUNCTION; - _pthread_cond_destroy = FUNCTION; - _pthread_cond_wait = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; - _pthread_cond_signal = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _pthread_getconcurrency = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _pthread_rwlock_init = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; _fork = FUNCTION; - _fork1 = FUNCTION; _sigaction = FUNCTION; _sigprocmask = FUNCTION; - _sigwait = FUNCTION; _sigsuspend = FUNCTION; _sigsetjmp = FUNCTION; _siglongjmp = FUNCTION; _sleep = FUNCTION; _alarm = FUNCTION; _setitimer = FUNCTION; - _cond_broadcast = FUNCTION; - _cond_init = FUNCTION; - _cond_destroy = FUNCTION; - _cond_signal = FUNCTION; - _cond_timedwait = FUNCTION; - _cond_reltimedwait = FUNCTION; - _cond_wait = FUNCTION; _mutex_destroy = FUNCTION; _mutex_init = FUNCTION; - _mutex_trylock = FUNCTION; _mutex_unlock = FUNCTION; - _rw_rdlock = FUNCTION; - _rw_tryrdlock = FUNCTION; - _rw_trywrlock = FUNCTION; - _rw_unlock = FUNCTION; - _rw_wrlock = FUNCTION; - _rwlock_init = FUNCTION; - _sema_init = FUNCTION; _sema_destroy = FUNCTION; - _sema_post = FUNCTION; - _sema_trywait = FUNCTION; - _sema_wait = FUNCTION; - _thr_continue = FUNCTION; _thr_create = FUNCTION; - _thr_exit = FUNCTION; - _thr_getconcurrency = FUNCTION; - _thr_getprio = FUNCTION; _thr_getspecific = FUNCTION; _thr_join = FUNCTION; _thr_keycreate = FUNCTION; - _thr_kill = FUNCTION; _thr_self = FUNCTION; - _thr_setconcurrency = FUNCTION; - _thr_setprio = FUNCTION; _thr_setspecific = FUNCTION; - _thr_sigsetmask = FUNCTION; - _thr_suspend = FUNCTION; - _thr_yield = FUNCTION; _thr_main = FUNCTION; - _thr_min_stack = FUNCTION; - _thr_stksegment = FUNCTION; }; diff --git a/usr/src/lib/libpthread/sparcv9/mapfile-vers b/usr/src/lib/libpthread/sparcv9/mapfile-vers index a86ac2b27f..ec353c069d 100644 --- a/usr/src/lib/libpthread/sparcv9/mapfile-vers +++ b/usr/src/lib/libpthread/sparcv9/mapfile-vers @@ -1,13 +1,9 @@ # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -22,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -226,147 +225,29 @@ SUNW_0.9 { SUNWprivate_1.1 { global: - __pthread_min_stack = FUNCTION; _pthread_setcleanupinit = FUNCTION; - _pthread_rwlock_trywrlock = FUNCTION; _resume = FUNCTION; _resume_ret = FUNCTION; - _canceloff = FUNCTION; - _cancelon = FUNCTION; - __thr_door_unbind = FUNCTION; - __sigtimedwait = FUNCTION; thr_probe_setup = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; - _pthread_create = FUNCTION; - _pthread_join = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_once = FUNCTION; - _pthread_equal = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_getspecific = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_exit = FUNCTION; - _pthread_kill = FUNCTION; - _pthread_self = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_testcancel = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_attr_getscope = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_condattr_destroy = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _pthread_cond_init = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_mutex_trylock = FUNCTION; - _pthread_cond_destroy = FUNCTION; - _pthread_cond_wait = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; - _pthread_cond_signal = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _pthread_getconcurrency = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _pthread_rwlock_init = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; _fork = FUNCTION; - _fork1 = FUNCTION; _sigaction = FUNCTION; _sigprocmask = FUNCTION; - _sigwait = FUNCTION; _sigsuspend = FUNCTION; _sigsetjmp = FUNCTION; _siglongjmp = FUNCTION; _sleep = FUNCTION; _alarm = FUNCTION; _setitimer = FUNCTION; - _cond_broadcast = FUNCTION; - _cond_init = FUNCTION; - _cond_destroy = FUNCTION; - _cond_signal = FUNCTION; - _cond_timedwait = FUNCTION; - _cond_reltimedwait = FUNCTION; - _cond_wait = FUNCTION; _mutex_destroy = FUNCTION; _mutex_init = FUNCTION; - _mutex_trylock = FUNCTION; _mutex_unlock = FUNCTION; - _rw_rdlock = FUNCTION; - _rw_tryrdlock = FUNCTION; - _rw_trywrlock = FUNCTION; - _rw_unlock = FUNCTION; - _rw_wrlock = FUNCTION; - _rwlock_init = FUNCTION; - _sema_init = FUNCTION; _sema_destroy = FUNCTION; - _sema_post = FUNCTION; - _sema_trywait = FUNCTION; - _sema_wait = FUNCTION; - _thr_continue = FUNCTION; _thr_create = FUNCTION; - _thr_exit = FUNCTION; - _thr_getconcurrency = FUNCTION; - _thr_getprio = FUNCTION; _thr_getspecific = FUNCTION; _thr_join = FUNCTION; _thr_keycreate = FUNCTION; - _thr_kill = FUNCTION; _thr_self = FUNCTION; - _thr_setconcurrency = FUNCTION; - _thr_setprio = FUNCTION; _thr_setspecific = FUNCTION; - _thr_sigsetmask = FUNCTION; - _thr_suspend = FUNCTION; - _thr_yield = FUNCTION; _thr_main = FUNCTION; - _thr_min_stack = FUNCTION; - _thr_stksegment = FUNCTION; }; diff --git a/usr/src/lib/libresolv/res_comp.c b/usr/src/lib/libresolv/res_comp.c index 9fb2a255f4..ef1268b80f 100644 --- a/usr/src/lib/libresolv/res_comp.c +++ b/usr/src/lib/libresolv/res_comp.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <sys/types.h> #include <stdio.h> #include <arpa/nameser.h> diff --git a/usr/src/lib/libresolv/res_debug.c b/usr/src/lib/libresolv/res_debug.c index 9821484e1d..6d05865e6b 100644 --- a/usr/src/lib/libresolv/res_debug.c +++ b/usr/src/lib/libresolv/res_debug.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <sys/types.h> #include <netinet/in.h> #include <stdio.h> diff --git a/usr/src/lib/libresolv/res_gethost.c b/usr/src/lib/libresolv/res_gethost.c index 53081cd5fe..f05fddd988 100644 --- a/usr/src/lib/libresolv/res_gethost.c +++ b/usr/src/lib/libresolv/res_gethost.c @@ -1,4 +1,9 @@ /* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* * Copyright (c) 1985, 1988 Regents of the University of California. * All rights reserved. * @@ -11,14 +16,8 @@ * */ -/* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS 1.11; UCB 6.32 */ +#pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <sys/param.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/usr/src/lib/libresolv/res_init.c b/usr/src/lib/libresolv/res_init.c index 6a40c6ac84..329de88923 100644 --- a/usr/src/lib/libresolv/res_init.c +++ b/usr/src/lib/libresolv/res_init.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <sys/types.h> #include <sys/sockio.h> #include <sys/socket.h> diff --git a/usr/src/lib/libresolv/res_mkquery.c b/usr/src/lib/libresolv/res_mkquery.c index e202d93b41..d2d316fecd 100644 --- a/usr/src/lib/libresolv/res_mkquery.c +++ b/usr/src/lib/libresolv/res_mkquery.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> diff --git a/usr/src/lib/libresolv/res_query.c b/usr/src/lib/libresolv/res_query.c index 8c8fb792b6..578086be6a 100644 --- a/usr/src/lib/libresolv/res_query.c +++ b/usr/src/lib/libresolv/res_query.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <sys/param.h> #include <sys/socket.h> #include <netinet/in.h> diff --git a/usr/src/lib/libresolv/res_send.c b/usr/src/lib/libresolv/res_send.c index 495193b065..6bd187b210 100644 --- a/usr/src/lib/libresolv/res_send.c +++ b/usr/src/lib/libresolv/res_send.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -44,7 +43,6 @@ * Send query to name server and wait for reply. */ -#include "c_synonyms.h" #include <sys/param.h> #include <sys/time.h> #include <sys/socket.h> diff --git a/usr/src/lib/libresolv/res_sethost.c b/usr/src/lib/libresolv/res_sethost.c index cce56ce82c..e565ecf63a 100644 --- a/usr/src/lib/libresolv/res_sethost.c +++ b/usr/src/lib/libresolv/res_sethost.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +39,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <sys/types.h> #include <arpa/nameser.h> #include <netinet/in.h> diff --git a/usr/src/lib/libresolv2/include/conf/sunoptions.h b/usr/src/lib/libresolv2/include/conf/sunoptions.h index 9e4257b81d..afdf7e3f78 100644 --- a/usr/src/lib/libresolv2/include/conf/sunoptions.h +++ b/usr/src/lib/libresolv2/include/conf/sunoptions.h @@ -1,5 +1,5 @@ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,7 +35,6 @@ #define SUNW_AREWEINNAMED /* Override _confcheck if proc is in.named */ #define SUNW_OPENFDOFFSET /* Open non-stdio fd:s with offset */ #define SUNW_POLL /* Use poll(2) instead of select(3) */ -#define SUNW_SYNONYMS /* Include synonyms.h (libresolv) */ #define SUNW_HOSTS_FALLBACK /* Configurable /etc/hosts fallback */ #define SUNW_LISTEN_BACKLOG /* Configurable listen(3N) backlog (named) */ #define SUNW_REJECT_BOGUS_H_LENGTH /* (libresolv) */ diff --git a/usr/src/lib/libresolv2/include/port_before.h b/usr/src/lib/libresolv2/include/port_before.h index f3399d1031..6cb7b14588 100644 --- a/usr/src/lib/libresolv2/include/port_before.h +++ b/usr/src/lib/libresolv2/include/port_before.h @@ -1,5 +1,5 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -130,10 +130,6 @@ #define ISC_FORMAT_PRINTF(fmt, args) #endif -#ifdef SUNW_SYNONYMS -#include "c_synonyms.h" -#endif - /* * Remove compiler warnings without modifying ISC source by including * various headers here, mostly to get function prototypes. diff --git a/usr/src/lib/librestart/common/librestart.c b/usr/src/lib/librestart/common/librestart.c index 788be378c1..253fe0a62a 100644 --- a/usr/src/lib/librestart/common/librestart.c +++ b/usr/src/lib/librestart/common/librestart.c @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -57,8 +58,6 @@ #include <sys/types.h> #include <time.h> #include <unistd.h> - -#define walkcontext _walkcontext #include <ucontext.h> #define min(a, b) ((a) > (b) ? (b) : (a)) diff --git a/usr/src/lib/librsm/Makefile.com b/usr/src/lib/librsm/Makefile.com index ce497b6ceb..ec648ce30e 100644 --- a/usr/src/lib/librsm/Makefile.com +++ b/usr/src/lib/librsm/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -54,7 +54,7 @@ LDLIBS += -lc .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/librsm/common/mapfile-vers b/usr/src/lib/librsm/common/mapfile-vers index 490ac96527..e52425a34e 100644 --- a/usr/src/lib/librsm/common/mapfile-vers +++ b/usr/src/lib/librsm/common/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -28,89 +28,47 @@ SUNWprivate_1.1 { global: rsm_create_localmemory_handle; - _rsm_create_localmemory_handle; rsm_free_interconnect_topology; - _rsm_free_interconnect_topology; rsm_free_localmemory_handle; - _rsm_free_localmemory_handle; rsm_get_controller; - _rsm_get_controller; rsm_get_controller_attr; - _rsm_get_controller_attr; rsm_get_interconnect_topology; - _rsm_get_interconnect_topology; rsm_get_segmentid_range; - _rsm_get_segmentid_range; rsm_intr_signal_post; - _rsm_intr_signal_post; rsm_intr_signal_wait; - _rsm_intr_signal_wait; rsm_intr_signal_wait_pollfd; - _rsm_intr_signal_wait_pollfd; rsm_memseg_export_create; - _rsm_memseg_export_create; rsm_memseg_export_destroy; - _rsm_memseg_export_destroy; rsm_memseg_export_publish; - _rsm_memseg_export_publish; rsm_memseg_export_rebind; - _rsm_memseg_export_rebind; rsm_memseg_export_republish; - _rsm_memseg_export_republish; rsm_memseg_export_unpublish; - _rsm_memseg_export_unpublish; rsm_memseg_get_pollfd; - _rsm_memseg_get_pollfd; rsm_memseg_import_close_barrier; - _rsm_memseg_import_close_barrier; rsm_memseg_import_connect; - _rsm_memseg_import_connect; rsm_memseg_import_destroy_barrier; - _rsm_memseg_import_destroy_barrier; rsm_memseg_import_disconnect; - _rsm_memseg_import_disconnect; rsm_memseg_import_get; - _rsm_memseg_import_get; rsm_memseg_import_get16; - _rsm_memseg_import_get16; rsm_memseg_import_get32; - _rsm_memseg_import_get32; rsm_memseg_import_get64; - _rsm_memseg_import_get64; rsm_memseg_import_get8; - _rsm_memseg_import_get8; rsm_memseg_import_get_mode; - _rsm_memseg_import_get_mode; rsm_memseg_import_getv; - _rsm_memseg_import_getv; rsm_memseg_import_init_barrier; - _rsm_memseg_import_init_barrier; rsm_memseg_import_map; - _rsm_memseg_import_map; rsm_memseg_import_open_barrier; - _rsm_memseg_import_open_barrier; rsm_memseg_import_order_barrier; - _rsm_memseg_import_order_barrier; rsm_memseg_import_put; - _rsm_memseg_import_put; rsm_memseg_import_put16; - _rsm_memseg_import_put16; rsm_memseg_import_put32; - _rsm_memseg_import_put32; rsm_memseg_import_put64; - _rsm_memseg_import_put64; rsm_memseg_import_put8; - _rsm_memseg_import_put8; rsm_memseg_import_putv; - _rsm_memseg_import_putv; rsm_memseg_import_set_mode; - _rsm_memseg_import_set_mode; rsm_memseg_import_unmap; - _rsm_memseg_import_unmap; rsm_memseg_release_pollfd; - _rsm_memseg_release_pollfd; rsm_release_controller; - _rsm_release_controller; local: *; }; diff --git a/usr/src/lib/librsm/common/rsmgen.c b/usr/src/lib/librsm/common/rsmgen.c index 1555121625..eb2f957945 100644 --- a/usr/src/lib/librsm/common/rsmgen.c +++ b/usr/src/lib/librsm/common/rsmgen.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,18 +20,12 @@ */ /* - * Copyright 2006 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" -#include "c_synonyms.h" -#if !defined(__lint) /* need a *_synonyms.h file */ -#define rsm_memseg_export_create _rsm_memseg_export_create -#define rsm_memseg_export_destroy _rsm_memseg_export_destroy -#define rsm_memseg_export_publish _rsm_memseg_export_publish -#endif #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -115,7 +108,7 @@ __rsm_get8x8(rsm_memseg_import_handle_t im_memseg, off_t off, { rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; uint8_t *data_addr = - (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; + (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; uint_t i = 0; int e; @@ -305,7 +298,7 @@ __rsm_put8x8(rsm_memseg_import_handle_t im_memseg, off_t off, { rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; uint8_t *data_addr = - (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; + (uint8_t *)&seg->rsmseg_vaddr[off - seg->rsmseg_mapoffset]; uint_t i = 0; int e; @@ -546,8 +539,8 @@ __rsm_getv(rsm_scat_gath_t *sg_io) if (errno == EINVAL) return (RSMERR_BAD_MEM_ALIGNMENT); else if (errno == ENOMEM || errno == ENXIO || - errno == EOVERFLOW) - return (RSMERR_BAD_LENGTH); + errno == EOVERFLOW) + return (RSMERR_BAD_LENGTH); else if (errno == EAGAIN) return (RSMERR_INSUFFICIENT_RESOURCES); else @@ -641,7 +634,7 @@ __rsm_put(rsm_memseg_import_handle_t im_memseg, off_t offset, void *src_addr, } bcopy(src_addr, seg->rsmseg_vaddr + offset - seg->rsmseg_mapoffset, - length); + length); if (seg->rsmseg_barmode == RSM_BARRIER_MODE_IMPLICIT) { e = seg->rsmseg_ops->rsm_memseg_import_close_barrier( @@ -696,8 +689,8 @@ __rsm_putv(rsm_scat_gath_t *sg_io) if (errno == EINVAL) return (RSMERR_BAD_MEM_ALIGNMENT); else if (errno == ENOMEM || errno == ENXIO || - errno == EOVERFLOW) - return (RSMERR_BAD_LENGTH); + errno == EOVERFLOW) + return (RSMERR_BAD_LENGTH); else if (errno == EAGAIN) return (RSMERR_INSUFFICIENT_RESOURCES); else @@ -720,7 +713,7 @@ __rsm_putv(rsm_scat_gath_t *sg_io) if (l_iovec->io_type == RSM_HANDLE_TYPE) { /* Get the surrogate export segment handle */ seg_hndl = (rsmseg_handle_t *) - l_iovec->local.handle; + l_iovec->local.handle; l_iovec->local.vaddr = seg_hndl->rsmseg_vaddr; l_iovec->io_type = RSM_VA_TYPE; } diff --git a/usr/src/lib/librsm/common/rsmlib.c b/usr/src/lib/librsm/common/rsmlib.c index e109b64f02..808a458278 100644 --- a/usr/src/lib/librsm/common/rsmlib.c +++ b/usr/src/lib/librsm/common/rsmlib.c @@ -20,13 +20,12 @@ */ /* - * Copyright 2006 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" -#include "c_synonyms.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -53,54 +52,6 @@ #include <rsmlib_in.h> #include <sys/rsm/rsm.h> -#ifdef __STDC__ - -#pragma weak rsm_get_controller = _rsm_get_controller -#pragma weak rsm_get_controller_attr = _rsm_get_controller_attr -#pragma weak rsm_release_controller = _rsm_release_controller -#pragma weak rsm_get_interconnect_topology = _rsm_get_interconnect_topology -#pragma weak rsm_free_interconnect_topology = _rsm_free_interconnect_topology -#pragma weak rsm_memseg_export_create = _rsm_memseg_export_create -#pragma weak rsm_memseg_export_destroy = _rsm_memseg_export_destroy -#pragma weak rsm_memseg_export_rebind = _rsm_memseg_export_rebind -#pragma weak rsm_memseg_export_publish = _rsm_memseg_export_publish -#pragma weak rsm_memseg_export_unpublish = _rsm_memseg_export_unpublish -#pragma weak rsm_memseg_export_republish = _rsm_memseg_export_republish -#pragma weak rsm_memseg_import_connect = _rsm_memseg_import_connect -#pragma weak rsm_memseg_import_disconnect = _rsm_memseg_import_disconnect -#pragma weak rsm_memseg_import_get8 = _rsm_memseg_import_get8 -#pragma weak rsm_memseg_import_get16 = _rsm_memseg_import_get16 -#pragma weak rsm_memseg_import_get32 = _rsm_memseg_import_get32 -#pragma weak rsm_memseg_import_get64 = _rsm_memseg_import_get64 -#pragma weak rsm_memseg_import_get = _rsm_memseg_import_get -#pragma weak rsm_memseg_import_getv = _rsm_memseg_import_getv -#pragma weak rsm_memseg_import_put8 = _rsm_memseg_import_put8 -#pragma weak rsm_memseg_import_put16 = _rsm_memseg_import_put16 -#pragma weak rsm_memseg_import_put32 = _rsm_memseg_import_put32 -#pragma weak rsm_memseg_import_put64 = _rsm_memseg_import_put64 -#pragma weak rsm_memseg_import_put = _rsm_memseg_import_put -#pragma weak rsm_memseg_import_putv = _rsm_memseg_import_putv -#pragma weak rsm_memseg_import_map = _rsm_memseg_import_map -#pragma weak rsm_memseg_import_unmap = _rsm_memseg_import_unmap -#pragma weak rsm_memseg_import_init_barrier = _rsm_memseg_import_init_barrier -#pragma weak rsm_memseg_import_open_barrier = _rsm_memseg_import_open_barrier -#pragma weak rsm_memseg_import_close_barrier = _rsm_memseg_import_close_barrier -#pragma weak rsm_memseg_import_order_barrier = _rsm_memseg_import_order_barrier -#pragma weak rsm_memseg_import_destroy_barrier = \ - _rsm_memseg_import_destroy_barrier -#pragma weak rsm_memseg_import_get_mode = _rsm_memseg_import_get_mode -#pragma weak rsm_memseg_import_set_mode = _rsm_memseg_import_set_mode -#pragma weak rsm_create_localmemory_handle = _rsm_create_localmemory_handle -#pragma weak rsm_free_localmemory_handle = _rsm_free_localmemory_handle -#pragma weak rsm_intr_signal_post = _rsm_intr_signal_post -#pragma weak rsm_intr_signal_wait = _rsm_intr_signal_wait -#pragma weak rsm_intr_signal_wait_pollfd = _rsm_intr_signal_wait_pollfd -#pragma weak rsm_memseg_get_pollfd = _rsm_memseg_get_pollfd -#pragma weak rsm_memseg_release_pollfd = _rsm_memseg_release_pollfd -#pragma weak rsm_get_segmentid_range = _rsm_get_segmentid_range - -#endif /* __STDC__ */ - /* lint -w2 */ extern void __rsmloopback_init_ops(rsm_segops_t *); extern void __rsmdefault_setops(rsm_segops_t *); @@ -153,16 +104,9 @@ static rsm_lib_funcs_t lib_functions = { _rsm_get_nodeid }; -int _rsm_get_interconnect_topology(rsm_topology_t **); -void _rsm_free_interconnect_topology(rsm_topology_t *); -int _rsm_memseg_import_open_barrier(rsmapi_barrier_t *); -int _rsm_memseg_import_close_barrier(rsmapi_barrier_t *); -int _rsm_memseg_import_unmap(rsm_memseg_import_handle_t); - rsm_topology_t *tp; - /* * service module function templates: */ @@ -230,7 +174,7 @@ _rsm_librsm_init() "_rsm_fd is %d\n", _rsm_fd)); if (fcntl(_rsm_fd, F_SETFD, FD_CLOEXEC) < 0) { - DBPRINTF((RSM_LIBRARY, RSM_ERR, + DBPRINTF((RSM_LIBRARY, RSM_ERR, "F_SETFD failed\n")); } @@ -266,7 +210,7 @@ _rsm_librsm_init() "unable to obtain topology data\n")); return (e); } else - rsm_local_nodeid = tp->topology_hdr.local_nodeid; + rsm_local_nodeid = tp->topology_hdr.local_nodeid; rsm_free_interconnect_topology(tp); @@ -604,7 +548,7 @@ _rsm_remove_pollfd_table(int segfd) } int -_rsm_get_controller(char *name, rsmapi_controller_handle_t *chdl) +rsm_get_controller(char *name, rsmapi_controller_handle_t *chdl) { rsm_controller_t *p; char cntr_name[MAXNAMELEN]; /* cntr_name=<cntr_type><unit> */ @@ -682,7 +626,7 @@ _rsm_get_controller(char *name, rsmapi_controller_handle_t *chdl) } int -_rsm_release_controller(rsmapi_controller_handle_t cntr_handle) +rsm_release_controller(rsmapi_controller_handle_t cntr_handle) { int e = RSM_SUCCESS; rsm_controller_t *chdl = (rsm_controller_t *)cntr_handle; @@ -737,7 +681,8 @@ _rsm_release_controller(rsmapi_controller_handle_t cntr_handle) return (e); } -int _rsm_get_controller_attr(rsmapi_controller_handle_t chandle, +int +rsm_get_controller_attr(rsmapi_controller_handle_t chandle, rsmapi_controller_attr_t *attr) { rsm_controller_t *p; @@ -802,7 +747,7 @@ int _rsm_get_controller_attr(rsmapi_controller_handle_t chandle, * by vaddr and size */ int -_rsm_memseg_export_create(rsmapi_controller_handle_t controller, +rsm_memseg_export_create(rsmapi_controller_handle_t controller, rsm_memseg_export_handle_t *memseg, void *vaddr, size_t length, @@ -850,7 +795,7 @@ _rsm_memseg_export_create(rsmapi_controller_handle_t controller, } if (((size_t)vaddr & (PAGESIZE - 1)) || - (length & (PAGESIZE - 1))) { + (length & (PAGESIZE - 1))) { DBPRINTF((RSM_LIBRARY, RSM_ERR, "invalid mem alignment for vaddr or length\n")); return (RSMERR_BAD_MEM_ALIGNMENT); @@ -955,7 +900,7 @@ _rsm_memseg_export_create(rsmapi_controller_handle_t controller, } int -_rsm_memseg_export_destroy(rsm_memseg_export_handle_t memseg) +rsm_memseg_export_destroy(rsm_memseg_export_handle_t memseg) { rsmseg_handle_t *seg; @@ -993,7 +938,7 @@ _rsm_memseg_export_destroy(rsm_memseg_export_handle_t memseg) } int -_rsm_memseg_export_rebind(rsm_memseg_export_handle_t memseg, void *vaddr, +rsm_memseg_export_rebind(rsm_memseg_export_handle_t memseg, void *vaddr, offset_t off, size_t length) { rsm_ioctlmsg_t msg; @@ -1040,7 +985,7 @@ _rsm_memseg_export_rebind(rsm_memseg_export_handle_t memseg, void *vaddr, } int -_rsm_memseg_export_publish(rsm_memseg_export_handle_t memseg, +rsm_memseg_export_publish(rsm_memseg_export_handle_t memseg, rsm_memseg_id_t *seg_id, rsmapi_access_entry_t access_list[], uint_t access_list_length) @@ -1117,7 +1062,7 @@ _rsm_memseg_export_publish(rsm_memseg_export_handle_t memseg, } int -_rsm_memseg_export_unpublish(rsm_memseg_export_handle_t memseg) +rsm_memseg_export_unpublish(rsm_memseg_export_handle_t memseg) { rsm_ioctlmsg_t msg; rsmseg_handle_t *seg = (rsmseg_handle_t *)memseg; @@ -1136,7 +1081,7 @@ _rsm_memseg_export_unpublish(rsm_memseg_export_handle_t memseg) mutex_unlock(&seg->rsmseg_lock); DBPRINTF((RSM_LIBRARY|RSM_EXPORT, RSM_ERR, "segment not published %d\n", - seg->rsmseg_keyid)); + seg->rsmseg_keyid)); return (RSMERR_SEG_NOT_PUBLISHED); } @@ -1159,7 +1104,7 @@ _rsm_memseg_export_unpublish(rsm_memseg_export_handle_t memseg) int -_rsm_memseg_export_republish(rsm_memseg_export_handle_t memseg, +rsm_memseg_export_republish(rsm_memseg_export_handle_t memseg, rsmapi_access_entry_t access_list[], uint_t access_list_length) { @@ -1213,7 +1158,7 @@ _rsm_memseg_export_republish(rsm_memseg_export_handle_t memseg, * import side memory segment operations: */ int -_rsm_memseg_import_connect(rsmapi_controller_handle_t controller, +rsm_memseg_import_connect(rsmapi_controller_handle_t controller, rsm_node_id_t node_id, rsm_memseg_id_t segment_id, rsm_permission_t perm, @@ -1263,8 +1208,8 @@ _rsm_memseg_import_connect(rsmapi_controller_handle_t controller, p->rsmseg_fd = open(DEVRSM, O_RDWR); if (p->rsmseg_fd < 0) { - DBPRINTF((RSM_LIBRARY|RSM_IMPORT, RSM_ERR, - "unable to open /dev/rsm")); + DBPRINTF((RSM_LIBRARY|RSM_IMPORT, RSM_ERR, + "unable to open /dev/rsm")); free((void *)p); return (RSMERR_INSUFFICIENT_RESOURCES); } @@ -1351,7 +1296,7 @@ _rsm_memseg_import_connect(rsmapi_controller_handle_t controller, int -_rsm_memseg_import_disconnect(rsm_memseg_import_handle_t im_memseg) +rsm_memseg_import_disconnect(rsm_memseg_import_handle_t im_memseg) { rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; int e; @@ -1553,7 +1498,7 @@ __rsm_import_implicit_map(rsmseg_handle_t *seg, int iotype) } int -_rsm_memseg_import_get8(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_get8(rsm_memseg_import_handle_t im_memseg, off_t offset, uint8_t *datap, ulong_t rep_cnt) @@ -1594,7 +1539,7 @@ _rsm_memseg_import_get8(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_get16(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_get16(rsm_memseg_import_handle_t im_memseg, off_t offset, uint16_t *datap, ulong_t rep_cnt) @@ -1636,7 +1581,7 @@ _rsm_memseg_import_get16(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_get32(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_get32(rsm_memseg_import_handle_t im_memseg, off_t offset, uint32_t *datap, ulong_t rep_cnt) @@ -1677,7 +1622,7 @@ _rsm_memseg_import_get32(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_get64(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_get64(rsm_memseg_import_handle_t im_memseg, off_t offset, uint64_t *datap, ulong_t rep_cnt) @@ -1718,7 +1663,7 @@ _rsm_memseg_import_get64(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_get(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_get(rsm_memseg_import_handle_t im_memseg, off_t offset, void *dst_addr, size_t length) @@ -1760,7 +1705,7 @@ _rsm_memseg_import_get(rsm_memseg_import_handle_t im_memseg, int -_rsm_memseg_import_getv(rsm_scat_gath_t *sg_io) +rsm_memseg_import_getv(rsm_scat_gath_t *sg_io) { rsm_controller_t *cntrl; rsmseg_handle_t *seg; @@ -1875,7 +1820,7 @@ _rsm_memseg_import_getv(rsm_scat_gath_t *sg_io) */ int -_rsm_memseg_import_put8(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_put8(rsm_memseg_import_handle_t im_memseg, off_t offset, uint8_t *datap, ulong_t rep_cnt) @@ -1918,7 +1863,7 @@ _rsm_memseg_import_put8(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_put16(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_put16(rsm_memseg_import_handle_t im_memseg, off_t offset, uint16_t *datap, ulong_t rep_cnt) @@ -1962,7 +1907,7 @@ _rsm_memseg_import_put16(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_put32(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_put32(rsm_memseg_import_handle_t im_memseg, off_t offset, uint32_t *datap, ulong_t rep_cnt) @@ -2005,7 +1950,7 @@ _rsm_memseg_import_put32(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_put64(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_put64(rsm_memseg_import_handle_t im_memseg, off_t offset, uint64_t *datap, ulong_t rep_cnt) @@ -2048,7 +1993,7 @@ _rsm_memseg_import_put64(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_put(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_put(rsm_memseg_import_handle_t im_memseg, off_t offset, void *src_addr, size_t length) @@ -2090,7 +2035,7 @@ _rsm_memseg_import_put(rsm_memseg_import_handle_t im_memseg, int -_rsm_memseg_import_putv(rsm_scat_gath_t *sg_io) +rsm_memseg_import_putv(rsm_scat_gath_t *sg_io) { rsm_controller_t *cntrl; rsmseg_handle_t *seg; @@ -2171,7 +2116,7 @@ _rsm_memseg_import_putv(rsm_scat_gath_t *sg_io) * by the user, and hence a signal post needs to be done here. */ if (sg_io->flags & RSM_IMPLICIT_SIGPOST && - e == RSM_SUCCESS) { + e == RSM_SUCCESS) { /* Do the implicit signal post */ /* @@ -2207,7 +2152,7 @@ _rsm_memseg_import_putv(rsm_scat_gath_t *sg_io) * import side memory segment operations (mapping): */ int -_rsm_memseg_import_map(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_map(rsm_memseg_import_handle_t im_memseg, void **address, rsm_attribute_t attr, rsm_permission_t perm, @@ -2339,7 +2284,7 @@ _rsm_memseg_import_map(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_unmap(rsm_memseg_import_handle_t im_memseg) +rsm_memseg_import_unmap(rsm_memseg_import_handle_t im_memseg) { /* * Until we fix the rsm driver to catch unload, we unload @@ -2381,7 +2326,7 @@ _rsm_memseg_import_unmap(rsm_memseg_import_handle_t im_memseg) * import side memory segment operations (barriers): */ int -_rsm_memseg_import_init_barrier(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_init_barrier(rsm_memseg_import_handle_t im_memseg, rsm_barrier_type_t type, rsmapi_barrier_t *barrier) { @@ -2415,7 +2360,7 @@ _rsm_memseg_import_init_barrier(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_open_barrier(rsmapi_barrier_t *barrier) +rsm_memseg_import_open_barrier(rsmapi_barrier_t *barrier) { rsmbar_handle_t *bar = (rsmbar_handle_t *)barrier; rsm_segops_t *ops; @@ -2447,7 +2392,7 @@ _rsm_memseg_import_open_barrier(rsmapi_barrier_t *barrier) } int -_rsm_memseg_import_order_barrier(rsmapi_barrier_t *barrier) +rsm_memseg_import_order_barrier(rsmapi_barrier_t *barrier) { rsmbar_handle_t *bar = (rsmbar_handle_t *)barrier; rsm_segops_t *ops; @@ -2476,7 +2421,7 @@ _rsm_memseg_import_order_barrier(rsmapi_barrier_t *barrier) } int -_rsm_memseg_import_close_barrier(rsmapi_barrier_t *barrier) +rsm_memseg_import_close_barrier(rsmapi_barrier_t *barrier) { rsmbar_handle_t *bar = (rsmbar_handle_t *)barrier; rsm_segops_t *ops; @@ -2510,7 +2455,7 @@ _rsm_memseg_import_close_barrier(rsmapi_barrier_t *barrier) } int -_rsm_memseg_import_destroy_barrier(rsmapi_barrier_t *barrier) +rsm_memseg_import_destroy_barrier(rsmapi_barrier_t *barrier) { rsmbar_handle_t *bar = (rsmbar_handle_t *)barrier; rsm_segops_t *ops; @@ -2541,7 +2486,7 @@ _rsm_memseg_import_destroy_barrier(rsmapi_barrier_t *barrier) } int -_rsm_memseg_import_get_mode(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_get_mode(rsm_memseg_import_handle_t im_memseg, rsm_barrier_mode_t *mode) { rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; @@ -2566,7 +2511,7 @@ _rsm_memseg_import_get_mode(rsm_memseg_import_handle_t im_memseg, } int -_rsm_memseg_import_set_mode(rsm_memseg_import_handle_t im_memseg, +rsm_memseg_import_set_mode(rsm_memseg_import_handle_t im_memseg, rsm_barrier_mode_t mode) { rsmseg_handle_t *seg = (rsmseg_handle_t *)im_memseg; @@ -2597,7 +2542,7 @@ _rsm_memseg_import_set_mode(rsm_memseg_import_handle_t im_memseg, } int -_rsm_intr_signal_post(void *memseg, uint_t flags) +rsm_intr_signal_post(void *memseg, uint_t flags) { rsm_ioctlmsg_t msg; rsmseg_handle_t *seg = (rsmseg_handle_t *)memseg; @@ -2626,7 +2571,7 @@ _rsm_intr_signal_post(void *memseg, uint_t flags) } int -_rsm_intr_signal_wait(void *memseg, int timeout) +rsm_intr_signal_wait(void *memseg, int timeout) { rsmseg_handle_t *seg = (rsmseg_handle_t *)memseg; struct pollfd fds; @@ -2650,7 +2595,7 @@ _rsm_intr_signal_wait(void *memseg, int timeout) } int -_rsm_intr_signal_wait_pollfd(struct pollfd fds[], nfds_t nfds, int timeout, +rsm_intr_signal_wait_pollfd(struct pollfd fds[], nfds_t nfds, int timeout, int *numfdsp) { return (__rsm_intr_signal_wait_common(fds, NULL, nfds, timeout, @@ -2721,7 +2666,7 @@ __rsm_intr_signal_wait_common(struct pollfd fds[], minor_t rnums[], * lets just allocate on the heap */ event_list = (rsm_poll_event_t *)malloc( - sizeof (rsm_poll_event_t)*numfd); + sizeof (rsm_poll_event_t)*numfd); if (!event_list) { /* * return with error even if poll might have succeeded @@ -2829,7 +2774,7 @@ __rsm_intr_signal_wait_common(struct pollfd fds[], minor_t rnums[], * A reference count for the descriptor is incremented. */ int -_rsm_memseg_get_pollfd(void *memseg, +rsm_memseg_get_pollfd(void *memseg, struct pollfd *poll_fd) { int i; @@ -2870,7 +2815,7 @@ _rsm_memseg_get_pollfd(void *memseg, * non zero. */ int -_rsm_memseg_release_pollfd(void * memseg) +rsm_memseg_release_pollfd(void * memseg) { int i; rsmseg_handle_t *seg = (rsmseg_handle_t *)memseg; @@ -2910,7 +2855,7 @@ _rsm_memseg_release_pollfd(void * memseg) * call rsm_free_interconnect_topolgy() to free the allocated memory. */ int -_rsm_get_interconnect_topology(rsm_topology_t **topology_data) +rsm_get_interconnect_topology(rsm_topology_t **topology_data) { uint32_t topology_data_size; rsm_topology_t *topology_ptr; @@ -2969,7 +2914,7 @@ again: void -_rsm_free_interconnect_topology(rsm_topology_t *topology_ptr) +rsm_free_interconnect_topology(rsm_topology_t *topology_ptr) { DBPRINTF((RSM_LIBRARY, RSM_DEBUG_VERBOSE, @@ -2984,7 +2929,7 @@ _rsm_free_interconnect_topology(rsm_topology_t *topology_ptr) } int -_rsm_create_localmemory_handle(rsmapi_controller_handle_t cntrl_handle, +rsm_create_localmemory_handle(rsmapi_controller_handle_t cntrl_handle, rsm_localmemory_handle_t *local_hndl_p, caddr_t local_vaddr, size_t len) { @@ -3029,7 +2974,7 @@ _rsm_create_localmemory_handle(rsmapi_controller_handle_t cntrl_handle, } int -_rsm_free_localmemory_handle(rsmapi_controller_handle_t cntrl_handle, +rsm_free_localmemory_handle(rsmapi_controller_handle_t cntrl_handle, rsm_localmemory_handle_t local_handle) { int e; @@ -3061,7 +3006,7 @@ _rsm_free_localmemory_handle(rsmapi_controller_handle_t cntrl_handle, } int -_rsm_get_segmentid_range(const char *appid, rsm_memseg_id_t *baseid, +rsm_get_segmentid_range(const char *appid, rsm_memseg_id_t *baseid, uint32_t *length) { char buf[RSMFILE_BUFSIZE]; @@ -3244,8 +3189,7 @@ dbg_printf(int msg_category, int msg_level, char *fmt, ...) va_list arg_list; va_start(arg_list, fmt); mutex_lock(&rsmlog_lock); - fprintf(rsmlog_fd, - "Thread %d ", thr_self()); + fprintf(rsmlog_fd, "Thread %d ", thr_self()); vfprintf(rsmlog_fd, fmt, arg_list); fflush(rsmlog_fd); mutex_unlock(&rsmlog_lock); diff --git a/usr/src/lib/librt/amd64/mapfile-vers b/usr/src/lib/librt/amd64/mapfile-vers index c60e5a140e..cf7d16252f 100644 --- a/usr/src/lib/librt/amd64/mapfile-vers +++ b/usr/src/lib/librt/amd64/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -114,28 +114,5 @@ SUNW_0.7 { SUNWprivate_1.1 { global: - _clock_getres = FUNCTION; - _clock_gettime = FUNCTION; - _clock_nanosleep = FUNCTION; - _clock_settime = FUNCTION; - _nanosleep = FUNCTION; - _sem_close = FUNCTION; - _sem_destroy = FUNCTION; - _sem_getvalue = FUNCTION; - _sem_init = FUNCTION; - _sem_open = FUNCTION; - _sem_post = FUNCTION; - _sem_reltimedwait_np = FUNCTION; - _sem_timedwait = FUNCTION; - _sem_trywait = FUNCTION; - _sem_unlink = FUNCTION; - _sem_wait = FUNCTION; - _sigqueue = FUNCTION; - _sigtimedwait = FUNCTION; - _sigwaitinfo = FUNCTION; - _timer_create = FUNCTION; - _timer_delete = FUNCTION; - _timer_getoverrun = FUNCTION; - _timer_gettime = FUNCTION; - _timer_settime = FUNCTION; + SUNWprivate_1.1; }; diff --git a/usr/src/lib/librt/i386/mapfile-vers b/usr/src/lib/librt/i386/mapfile-vers index db79a89e00..05e24c5d14 100644 --- a/usr/src/lib/librt/i386/mapfile-vers +++ b/usr/src/lib/librt/i386/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -123,28 +123,5 @@ SUNW_0.7 { SUNWprivate_1.1 { global: - _clock_getres = FUNCTION; - _clock_gettime = FUNCTION; - _clock_nanosleep = FUNCTION; - _clock_settime = FUNCTION; - _nanosleep = FUNCTION; - _sem_close = FUNCTION; - _sem_destroy = FUNCTION; - _sem_getvalue = FUNCTION; - _sem_init = FUNCTION; - _sem_open = FUNCTION; - _sem_post = FUNCTION; - _sem_reltimedwait_np = FUNCTION; - _sem_timedwait = FUNCTION; - _sem_trywait = FUNCTION; - _sem_unlink = FUNCTION; - _sem_wait = FUNCTION; - _sigqueue = FUNCTION; - _sigtimedwait = FUNCTION; - _sigwaitinfo = FUNCTION; - _timer_create = FUNCTION; - _timer_delete = FUNCTION; - _timer_getoverrun = FUNCTION; - _timer_gettime = FUNCTION; - _timer_settime = FUNCTION; + SUNWprivate_1.1; }; diff --git a/usr/src/lib/librt/sparc/mapfile-vers b/usr/src/lib/librt/sparc/mapfile-vers index db79a89e00..05e24c5d14 100644 --- a/usr/src/lib/librt/sparc/mapfile-vers +++ b/usr/src/lib/librt/sparc/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -123,28 +123,5 @@ SUNW_0.7 { SUNWprivate_1.1 { global: - _clock_getres = FUNCTION; - _clock_gettime = FUNCTION; - _clock_nanosleep = FUNCTION; - _clock_settime = FUNCTION; - _nanosleep = FUNCTION; - _sem_close = FUNCTION; - _sem_destroy = FUNCTION; - _sem_getvalue = FUNCTION; - _sem_init = FUNCTION; - _sem_open = FUNCTION; - _sem_post = FUNCTION; - _sem_reltimedwait_np = FUNCTION; - _sem_timedwait = FUNCTION; - _sem_trywait = FUNCTION; - _sem_unlink = FUNCTION; - _sem_wait = FUNCTION; - _sigqueue = FUNCTION; - _sigtimedwait = FUNCTION; - _sigwaitinfo = FUNCTION; - _timer_create = FUNCTION; - _timer_delete = FUNCTION; - _timer_getoverrun = FUNCTION; - _timer_gettime = FUNCTION; - _timer_settime = FUNCTION; + SUNWprivate_1.1; }; diff --git a/usr/src/lib/librt/sparcv9/mapfile-vers b/usr/src/lib/librt/sparcv9/mapfile-vers index c60e5a140e..cf7d16252f 100644 --- a/usr/src/lib/librt/sparcv9/mapfile-vers +++ b/usr/src/lib/librt/sparcv9/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -114,28 +114,5 @@ SUNW_0.7 { SUNWprivate_1.1 { global: - _clock_getres = FUNCTION; - _clock_gettime = FUNCTION; - _clock_nanosleep = FUNCTION; - _clock_settime = FUNCTION; - _nanosleep = FUNCTION; - _sem_close = FUNCTION; - _sem_destroy = FUNCTION; - _sem_getvalue = FUNCTION; - _sem_init = FUNCTION; - _sem_open = FUNCTION; - _sem_post = FUNCTION; - _sem_reltimedwait_np = FUNCTION; - _sem_timedwait = FUNCTION; - _sem_trywait = FUNCTION; - _sem_unlink = FUNCTION; - _sem_wait = FUNCTION; - _sigqueue = FUNCTION; - _sigtimedwait = FUNCTION; - _sigwaitinfo = FUNCTION; - _timer_create = FUNCTION; - _timer_delete = FUNCTION; - _timer_getoverrun = FUNCTION; - _timer_gettime = FUNCTION; - _timer_settime = FUNCTION; + SUNWprivate_1.1; }; diff --git a/usr/src/lib/libscf/common/error.c b/usr/src/lib/libscf/common/error.c index c9f285837d..0bbfe84992 100644 --- a/usr/src/lib/libscf/common/error.c +++ b/usr/src/lib/libscf/common/error.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +39,6 @@ #include <sys/machelf.h> #include <thread.h> -#define walkcontext _walkcontext /* work around 4743525 */ #include <ucontext.h> extern int ndebug; diff --git a/usr/src/lib/libscf/common/libscf_impl.h b/usr/src/lib/libscf/common/libscf_impl.h index f0947de5a0..834c23fc53 100644 --- a/usr/src/lib/libscf/common/libscf_impl.h +++ b/usr/src/lib/libscf/common/libscf_impl.h @@ -29,10 +29,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#ifndef NATIVE_BUILD -#include "c_synonyms.h" -#endif - #include <libscf.h> #include <libscf_priv.h> diff --git a/usr/src/lib/libscf/common/scf_type.c b/usr/src/lib/libscf/common/scf_type.c index a8aed09f5a..5ec1dbc8de 100644 --- a/usr/src/lib/libscf/common/scf_type.c +++ b/usr/src/lib/libscf/common/scf_type.c @@ -26,10 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#ifndef NATIVE_BUILD -#include "c_synonyms.h" -#endif - #include <repcache_protocol.h> #include "scf_type.h" #include <errno.h> diff --git a/usr/src/lib/libsendfile/Makefile.com b/usr/src/lib/libsendfile/Makefile.com index b0bb417688..742e1c93a7 100644 --- a/usr/src/lib/libsendfile/Makefile.com +++ b/usr/src/lib/libsendfile/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -46,7 +46,7 @@ CFLAGS += $(CCVERBOSE) .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/libsldap/common/ns_connect.c b/usr/src/lib/libsldap/common/ns_connect.c index b3d2d0cd63..5d77fec52d 100644 --- a/usr/src/lib/libsldap/common/ns_connect.c +++ b/usr/src/lib/libsldap/common/ns_connect.c @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -48,7 +49,6 @@ #include <procfs.h> #include <unistd.h> -extern unsigned int _sleep(unsigned int); extern int ldap_sasl_cram_md5_bind_s(LDAP *, char *, struct berval *, LDAPControl **, LDAPControl **); extern int ldapssl_install_gethostbyaddr(LDAP *ld, const char *skip); @@ -2900,7 +2900,7 @@ __s_api_getConnection( (void) memset(&anon, 0, sizeof (ns_cred_t)); anon.auth.type = NS_LDAP_AUTH_NONE; - for (; ; ) { + for (;;) { if (cred != NULL) { /* using specified auth method */ rc = makeConnection(&con, server, cred, @@ -2999,7 +2999,7 @@ __s_api_getConnection( if (flags & NS_LDAP_HARD) { if (sec < LDAPMAXHARDLOOKUPTIME) sec *= 2; - _sleep(sec); + (void) sleep(sec); } else { break; } diff --git a/usr/src/lib/libsocket/inet/ether_addr.c b/usr/src/lib/libsocket/inet/ether_addr.c index 12c7a06f70..37105bb302 100644 --- a/usr/src/lib/libsocket/inet/ether_addr.c +++ b/usr/src/lib/libsocket/inet/ether_addr.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -47,7 +47,6 @@ * bytes are always in network order. */ -#include "c_synonyms.h" #include <stdio.h> #include <ctype.h> #include <string.h> @@ -92,7 +91,7 @@ ether_hostton( NSS_XbyY_INIT(&arg, e, NULL, 0, str2ether); arg.key.name = host; res = nss_search(&db_root, _nss_initf_ethers, - NSS_DBOP_ETHERS_HOSTTON, &arg); + NSS_DBOP_ETHERS_HOSTTON, &arg); (void) NSS_XbyY_FINI(&arg); return (arg.status = res); } @@ -117,7 +116,7 @@ ether_ntohost( NSS_XbyY_INIT(&arg, NULL, host, 0, str2ether); arg.key.ether = (void *)e; res = nss_search(&db_root, _nss_initf_ethers, - NSS_DBOP_ETHERS_NTOHOST, &arg); + NSS_DBOP_ETHERS_NTOHOST, &arg); /* memcpy(host, ether_res.host, strlen(ether_res.host)); */ (void) NSS_XbyY_FINI(&arg); return (arg.status = res); @@ -294,7 +293,7 @@ ether_aton(const char *s) i = sscanf(s, " %x:%x:%x:%x:%x:%x", &t[0], &t[1], &t[2], &t[3], &t[4], &t[5]); if (i != 6) - return (NULL); + return (NULL); for (i = 0; i < 6; i++) e->ether_addr_octet[i] = (uchar_t)t[i]; return (e); diff --git a/usr/src/lib/libsocket/inet/getaddrinfo.c b/usr/src/lib/libsocket/inet/getaddrinfo.c index f3f93acbe1..30b1860eb6 100644 --- a/usr/src/lib/libsocket/inet/getaddrinfo.c +++ b/usr/src/lib/libsocket/inet/getaddrinfo.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -38,10 +38,9 @@ #include <ctype.h> #include <sys/types.h> #include <stdlib.h> +#include <libintl.h> #include <net/if.h> -extern char *_dgettext(const char *, const char *); - #define ai2sin(x) ((struct sockaddr_in *)((x)->ai_addr)) #define ai2sin6(x) ((struct sockaddr_in6 *)((x)->ai_addr)) @@ -837,9 +836,9 @@ const char * gai_strerror(int ecode) { if (ecode < 0) - return (_dgettext(TEXT_DOMAIN, + return (dgettext(TEXT_DOMAIN, "name translation internal error")); else if (ecode < gai_nerr) - return (_dgettext(TEXT_DOMAIN, gai_errlist[ecode])); - return (_dgettext(TEXT_DOMAIN, "unknown name translation error")); + return (dgettext(TEXT_DOMAIN, gai_errlist[ecode])); + return (dgettext(TEXT_DOMAIN, "unknown name translation error")); } diff --git a/usr/src/lib/libsocket/inet/rcmd.c b/usr/src/lib/libsocket/inet/rcmd.c index 5cb0fb674f..6a0edcac5b 100644 --- a/usr/src/lib/libsocket/inet/rcmd.c +++ b/usr/src/lib/libsocket/inet/rcmd.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -74,11 +75,6 @@ char *strchr(); char *index(); #endif /* SYSV */ -extern char *_dgettext(); -extern int _sigaction(); -extern int _sigaddset(); -extern int _sigprocmask(); -extern int _fcntl(); extern int usingypmap(); static int _validuser(FILE *hostf, char *rhost, const char *luser, @@ -151,7 +147,7 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, rc = getaddrinfo(*ahost, aport, &hints, &res); if (rc != 0) { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, "%s: unknown host%s\n"), + dgettext(TEXT_DOMAIN, "%s: unknown host%s\n"), *ahost, rc == EAI_AGAIN ? " (try again later)" : ""); return (-1); } @@ -162,12 +158,12 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, /* ignore SIGPIPE */ bzero((char *)&newaction, sizeof (newaction)); newaction.sa_handler = SIG_IGN; - (void) _sigaction(SIGPIPE, &newaction, &oldaction); + (void) sigaction(SIGPIPE, &newaction, &oldaction); /* block SIGURG */ bzero((char *)&newmask, sizeof (newmask)); - (void) _sigaddset(&newmask, SIGURG); - (void) _sigprocmask(SIG_BLOCK, &newmask, &oldmask); + (void) sigaddset(&newmask, SIGURG); + (void) sigprocmask(SIG_BLOCK, &newmask, &oldmask); #else oldmask = _sigblock(sigmask(SIGURG)); #endif /* SYSV */ @@ -188,17 +184,17 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, if (errno == EAGAIN) (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, + dgettext(TEXT_DOMAIN, "socket: All ports in use\n")); else perror("rcmd: socket"); #ifdef SYSV /* restore original SIGPIPE handler */ - (void) _sigaction(SIGPIPE, &oldaction, + (void) sigaction(SIGPIPE, &oldaction, (struct sigaction *)0); /* restore original signal mask */ - (void) _sigprocmask(SIG_SETMASK, &oldmask, + (void) sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0); #else sigsetmask(oldmask); @@ -219,7 +215,7 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, in6addr->sin6_family = AF_INET6; addrlen = sizeof (struct sockaddr_in6); } - (void) _fcntl(s, F_SETOWN, pid); + (void) fcntl(s, F_SETOWN, pid); if (connect(s, (struct sockaddr *)&caddr, addrlen) >= 0) break; (void) close(s); @@ -241,7 +237,7 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, addr = (char *)&((struct sockaddr_in *) res->ai_addr)->sin_addr; (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, "connect to address %s: "), + dgettext(TEXT_DOMAIN, "connect to address %s: "), inet_ntop(res->ai_addr->sa_family, addr, abuf, sizeof (abuf))); errno = oerrno; @@ -254,7 +250,7 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, addr = (char *)&((struct sockaddr_in *) res->ai_addr)->sin_addr; (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, "Trying %s...\n"), + dgettext(TEXT_DOMAIN, "Trying %s...\n"), inet_ntop(res->ai_addr->sa_family, addr, abuf, sizeof (abuf))); continue; @@ -263,11 +259,11 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, freeaddrinfo(resp); #ifdef SYSV /* restore original SIGPIPE handler */ - (void) _sigaction(SIGPIPE, &oldaction, + (void) sigaction(SIGPIPE, &oldaction, (struct sigaction *)0); /* restore original signal mask */ - (void) _sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0); + (void) sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0); #else sigsetmask(oldmask); #endif /* SYSV */ @@ -286,7 +282,7 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, (void) listen(s2, 1); (void) snprintf(aport, MAX_SHORTSTRLEN, "%d", lport); if (write(s, aport, strlen(aport)+1) != strlen(aport)+1) { - perror(_dgettext(TEXT_DOMAIN, + perror(dgettext(TEXT_DOMAIN, "write: setting up stderr")); (void) close(s2); goto bad; @@ -339,9 +335,9 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, sin = (struct sockaddr_in *)&faddr; if (ntohs(sin->sin_port) >= IPPORT_RESERVED) { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, - "socket: protocol failure in circuit " - "setup.\n")); + dgettext(TEXT_DOMAIN, + "socket: protocol failure in circuit " + "setup.\n")); goto bad2; } break; @@ -349,15 +345,15 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, sin6 = (struct sockaddr_in6 *)&faddr; if (ntohs(sin6->sin6_port) >= IPPORT_RESERVED) { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, - "socket: protocol failure in circuit " - "setup.\n")); + dgettext(TEXT_DOMAIN, + "socket: protocol failure in circuit " + "setup.\n")); goto bad2; } break; default: (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, + dgettext(TEXT_DOMAIN, "socket: protocol failure in circuit setup.\n")); goto bad2; } @@ -369,14 +365,14 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, if (retval != 1) { if (retval == 0) { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, + dgettext(TEXT_DOMAIN, "Protocol error, %s closed connection\n"), *ahost); } else if (retval < 0) { perror(*ahost); } else { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, + dgettext(TEXT_DOMAIN, "Protocol error, %s sent %d bytes\n"), *ahost, retval); } @@ -392,10 +388,10 @@ int rcmd_af(char **ahost, unsigned short rport, const char *locuser, } #ifdef SYSV /* restore original SIGPIPE handler */ - (void) _sigaction(SIGPIPE, &oldaction, (struct sigaction *)0); + (void) sigaction(SIGPIPE, &oldaction, (struct sigaction *)0); /* restore original signal mask */ - (void) _sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0); + (void) sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0); #else sigsetmask(oldmask); #endif /* SYSV */ @@ -408,10 +404,10 @@ bad: (void) close(s); #ifdef SYSV /* restore original SIGPIPE handler */ - (void) _sigaction(SIGPIPE, &oldaction, (struct sigaction *)0); + (void) sigaction(SIGPIPE, &oldaction, (struct sigaction *)0); /* restore original signal mask */ - (void) _sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0); + (void) sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0); #else sigsetmask(oldmask); #endif /* SYSV */ @@ -707,7 +703,7 @@ _validuser(FILE *hostf, char *rhost, const char *luser, p++; user = p; while (*p != '\n' && *p != ' ' && *p != '\t' && - *p != '\0') + *p != '\0') p++; } else user = p; @@ -744,7 +740,7 @@ _validuser(FILE *hostf, char *rhost, const char *luser, #ifdef NIS else if (user[0] == '+' && user[1] == '@') usermatch = innetgr(user+2, NULL, - ruser, domain); + ruser, domain); else if (user[0] == '-' && user[1] == '@') { if (hostmatch && innetgr(user+2, NULL, ruser, domain)) diff --git a/usr/src/lib/libsocket/inet/rexec.c b/usr/src/lib/libsocket/inet/rexec.c index 09ce6fe49d..63f8180219 100644 --- a/usr/src/lib/libsocket/inet/rexec.c +++ b/usr/src/lib/libsocket/inet/rexec.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -57,8 +58,6 @@ #define MAX_SHORTSTRLEN 6 -extern char *_dgettext(); - void _ruserpass(const char *host, char **aname, char **apass); int rexec(char **ahost, unsigned short rport, const char *name, @@ -81,7 +80,7 @@ int rexec_af(char **ahost, unsigned short rport, const char *name, if (!(af == AF_INET || af == AF_INET6 || af == AF_UNSPEC)) { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, "%d: Address family not " + dgettext(TEXT_DOMAIN, "%d: Address family not " "supported\n"), af); errno = EAFNOSUPPORT; return (-1); @@ -95,7 +94,7 @@ int rexec_af(char **ahost, unsigned short rport, const char *name, if (rc != 0) { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, "%s: unknown host\n"), + dgettext(TEXT_DOMAIN, "%s: unknown host\n"), *ahost); return (-1); } diff --git a/usr/src/lib/libsocket/inet/ruserpass.c b/usr/src/lib/libsocket/inet/ruserpass.c index 4d9780f2af..17d59439a9 100644 --- a/usr/src/lib/libsocket/inet/ruserpass.c +++ b/usr/src/lib/libsocket/inet/ruserpass.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -48,8 +49,6 @@ #include <stdlib.h> #include <libintl.h> -extern char *_dgettext(); - #ifdef SYSV #define index strchr #endif /* SYSV */ @@ -126,7 +125,7 @@ _ruserpass(const char *host, char **aname, char **apass) *aname = malloc(MAXANAME + 1); (void) cuserid(myname); - (void) printf(_dgettext(TEXT_DOMAIN, "Name (%s:%s): "), + (void) printf(dgettext(TEXT_DOMAIN, "Name (%s:%s): "), host, myname); (void) fflush(stdout); if (read(2, *aname, MAXANAME) <= 0) @@ -139,8 +138,8 @@ _ruserpass(const char *host, char **aname, char **apass) *index(*aname, '\n') = 0; } if (*aname && *apass == 0) { - (void) printf(_dgettext(TEXT_DOMAIN, "Password (%s:%s): "), - host, *aname); + (void) printf(dgettext(TEXT_DOMAIN, "Password (%s:%s): "), + host, *aname); (void) fflush(stdout); *apass = getpass(""); } @@ -194,12 +193,12 @@ next: break; case PASSWD: if (fstat64(fileno(d->cfile), &stb) >= 0 && - (stb.st_mode & 077) != 0) { + (stb.st_mode & 077) != 0) { (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, + dgettext(TEXT_DOMAIN, "Error - .netrc file not correct mode.\n")); (void) fprintf(stderr, - _dgettext(TEXT_DOMAIN, + dgettext(TEXT_DOMAIN, "Remove password or correct mode.\n")); exit(1); } @@ -215,7 +214,7 @@ next: (void) token(); break; default: - (void) fprintf(stderr, _dgettext(TEXT_DOMAIN, + (void) fprintf(stderr, dgettext(TEXT_DOMAIN, "Unknown .netrc option %s\n"), d->tokval); break; } @@ -253,7 +252,7 @@ token() } else { *cp++ = (char)c; while ((c = getc(d->cfile)) != EOF && - c != '\n' && c != '\t' && c != ' ' && c != ',') { + c != '\n' && c != '\t' && c != ' ' && c != ',') { if (c == '\\') c = getc(d->cfile); *cp++ = (char)c; diff --git a/usr/src/lib/libsocket/socket/_soutil.c b/usr/src/lib/libsocket/socket/_soutil.c index 732b544ac6..d91e549cff 100644 --- a/usr/src/lib/libsocket/socket/_soutil.c +++ b/usr/src/lib/libsocket/socket/_soutil.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,8 +43,6 @@ #include <stdlib.h> #include <string.h> -extern int _stat(); - /* * XXX The functions in this file are only needed to support transport * providers that have not yet been converted to use /etc/sock2path. @@ -144,7 +142,7 @@ retry: #if defined(i386) if (_xstat(_STAT_VER, net->nc_device, &stats) < 0) { #else - if (_stat(net->nc_device, &stats) < 0) { + if (stat(net->nc_device, &stats) < 0) { #endif switch (errno) { case EINTR: @@ -189,15 +187,16 @@ _s_match_netconf(int family, int type, int proto, void **nethandle) char *oproto; if (family < 0 || - family >= (int)sizeof (family_sw) / (int)sizeof (char *) || - proto < 0 || proto >= IPPROTO_MAX) { - errno = EPROTONOSUPPORT; - return (NULL); + family >= (int)sizeof (family_sw) / (int)sizeof (char *) || + proto < 0 || proto >= IPPROTO_MAX) { + errno = EPROTONOSUPPORT; + return (NULL); } if (proto) { if (proto >= (int)sizeof (proto_sw) / (int)sizeof (char *)) oproto = ""; - else oproto = proto_sw[proto]; + else + oproto = proto_sw[proto]; } /* @@ -236,7 +235,7 @@ _s_match_netconf(int family, int type, int proto, void **nethandle) continue; } else { if (strcmp(net->nc_protofmly, family_sw[family]) == 0 && - semantics == type) { + semantics == type) { break; } } diff --git a/usr/src/lib/libthread/amd64/mapfile-vers b/usr/src/lib/libthread/amd64/mapfile-vers index e119d1e421..a0e4850401 100644 --- a/usr/src/lib/libthread/amd64/mapfile-vers +++ b/usr/src/lib/libthread/amd64/mapfile-vers @@ -1,7 +1,4 @@ # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the @@ -21,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -250,97 +250,9 @@ SUNW_0.7 { SUNWprivate_1.1 { global: - _pthread_rwlock_trywrlock = FUNCTION; _resume = FUNCTION; _resume_ret = FUNCTION; - _canceloff = FUNCTION; - _cancelon = FUNCTION; - __pthread_min_stack = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; - _pthread_setcleanupinit = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; - _pthread_create = FUNCTION; - _pthread_join = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_once = FUNCTION; - _pthread_equal = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_getspecific = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_exit = FUNCTION; - _pthread_kill = FUNCTION; - _pthread_self = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_testcancel = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_attr_getscope = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_condattr_destroy = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _pthread_cond_init = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_mutex_trylock = FUNCTION; - _pthread_cond_destroy = FUNCTION; - _pthread_cond_wait = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; - _pthread_cond_signal = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _pthread_getconcurrency = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_rwlock_init = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; thr_probe_setup = FUNCTION; - __thr_door_unbind = FUNCTION; - _thr_detach = FUNCTION; - _thr_key_delete = FUNCTION; _thr_continue_allmutators = FUNCTION; _thr_continue_mutator = FUNCTION; _thr_getstate = FUNCTION; @@ -361,63 +273,29 @@ SUNWprivate_1.1 { thr_suspend_allmutators = FUNCTION; thr_suspend_mutator = FUNCTION; thr_wait_mutator = FUNCTION; - _cond_broadcast = FUNCTION; - _cond_init = FUNCTION; - _cond_destroy = FUNCTION; - _cond_signal = FUNCTION; - _cond_timedwait = FUNCTION; - _cond_reltimedwait = FUNCTION; - _cond_wait = FUNCTION; _mutex_destroy = FUNCTION; _mutex_init = FUNCTION; _mutex_lock = FUNCTION; - _mutex_trylock = FUNCTION; _mutex_unlock = FUNCTION; - _rw_rdlock = FUNCTION; - _rw_tryrdlock = FUNCTION; - _rw_trywrlock = FUNCTION; - _rw_unlock = FUNCTION; - _rw_wrlock = FUNCTION; - _rwlock_init = FUNCTION; - _sema_init = FUNCTION; _sema_destroy = FUNCTION; - _sema_post = FUNCTION; - _sema_trywait = FUNCTION; - _sema_wait = FUNCTION; - _thr_continue = FUNCTION; _thr_create = FUNCTION; - _thr_exit = FUNCTION; - _thr_getconcurrency = FUNCTION; - _thr_getprio = FUNCTION; _thr_getspecific = FUNCTION; _thr_join = FUNCTION; _thr_keycreate = FUNCTION; - _thr_kill = FUNCTION; _thr_self = FUNCTION; - _thr_setconcurrency = FUNCTION; - _thr_setprio = FUNCTION; _thr_setspecific = FUNCTION; - _thr_sigsetmask = FUNCTION; - _thr_suspend = FUNCTION; - _thr_yield = FUNCTION; _thr_main = FUNCTION; - _thr_min_stack = FUNCTION; - _thr_stksegment = FUNCTION; __tls_get_addr = FUNCTION; - __sigtimedwait = FUNCTION; _getsp = FUNCTION; _rwlock_destroy = FUNCTION; __gettsp = FUNCTION; _assfail = FUNCTION; _sigoff = FUNCTION; _sigon = FUNCTION; - __nanosleep = FUNCTION; _fork = FUNCTION; - _fork1 = FUNCTION; _setcontext = FUNCTION; _sigaction = FUNCTION NODIRECT; _sigprocmask = FUNCTION; - _sigwait = FUNCTION; _sigsuspend = FUNCTION; _sigsetjmp = FUNCTION; _sleep = FUNCTION; diff --git a/usr/src/lib/libthread/i386/mapfile-vers b/usr/src/lib/libthread/i386/mapfile-vers index 9c8abbf15e..473b54c09e 100644 --- a/usr/src/lib/libthread/i386/mapfile-vers +++ b/usr/src/lib/libthread/i386/mapfile-vers @@ -1,7 +1,4 @@ # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the @@ -21,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -256,181 +256,60 @@ SUNW_0.7 { SUNWprivate_1.1 { global: _thr_suspend_allmutators = FUNCTION; - __nanosleep = FUNCTION; _thr_join = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _thr_detach = FUNCTION; - _cond_wait = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; _sigoff = FUNCTION; - _rwlock_init = FUNCTION; _pthread_setcleanupinit = FUNCTION; - _pthread_join = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; _thr_sighndlrinfo = FUNCTION; thr_suspend_mutator = FUNCTION; _thr_setspecific = FUNCTION; _sigaction = FUNCTION NODIRECT; _thr_keycreate = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; _mutex_destroy = FUNCTION; _resume = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _sema_init = FUNCTION; _sigon = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _pthread_once = FUNCTION; _setcontext = FUNCTION; - _thr_kill = FUNCTION; - _pthread_create = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_mutex_trylock = FUNCTION; - _pthread_getconcurrency = FUNCTION; _thr_setmutator = FUNCTION; thr_wait_mutator = FUNCTION; - _thr_stksegment = FUNCTION; - __sigtimedwait = FUNCTION; _mutex_init = FUNCTION; _fork = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; _resume_ret = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; _sema_destroy = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_equal = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; _sigprocmask = FUNCTION; _thr_getstate = FUNCTION; _thr_self = FUNCTION; - _fork1 = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; _mutex_lock = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - __pthread_min_stack = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_attr_getscope = FUNCTION; - _pthread_cond_destroy = FUNCTION; thr_mutators_barrier = FUNCTION; _thr_getspecific = FUNCTION; _rwlock_destroy = FUNCTION; - _sema_post = FUNCTION; _sleep = FUNCTION; - _pthread_exit = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _sigwait = FUNCTION; _thr_setstate = FUNCTION; - _thr_setprio = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; - _mutex_trylock = FUNCTION; _alarm = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _sema_trywait = FUNCTION; - _pthread_kill = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_cond_wait = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_rwlock_init = FUNCTION; thr_probe_setup = FUNCTION; _thr_suspend_mutator = FUNCTION; - _cond_timedwait = FUNCTION; _sigsuspend = FUNCTION; thr_getstate = FUNCTION; - _thr_suspend = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; _mutex_unlock = FUNCTION; - _canceloff = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _sema_wait = FUNCTION; - _pthread_self = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; _sigsetjmp = FUNCTION; thr_setmutator = FUNCTION; - _thr_yield = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_testcancel = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_cond_signal = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _thr_key_delete = FUNCTION; _thr_wait_mutator = FUNCTION; - _thr_getconcurrency = FUNCTION; ___tls_get_addr = FUNCTION; - _rw_rdlock = FUNCTION; - _cancelon = FUNCTION; thr_suspend_allmutators = FUNCTION; - _thr_continue = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; _setitimer = FUNCTION; thr_setstate = FUNCTION; _thr_main = FUNCTION; - _pthread_rwlock_trywrlock = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _rw_tryrdlock = FUNCTION; - _pthread_getspecific = FUNCTION; - _pthread_cond_init = FUNCTION; _thr_continue_allmutators = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; - __thr_door_unbind = FUNCTION; thr_continue_mutator = FUNCTION; - _cond_reltimedwait = FUNCTION; __gettsp = FUNCTION; _thr_create = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; mutex_held = FUNCTION; - _cond_init = FUNCTION; - _thr_min_stack = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _rw_trywrlock = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; _assfail = FUNCTION; - _thr_exit = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; _thr_continue_mutator = FUNCTION; thr_sighndlrinfo = FUNCTION; - _thr_sigsetmask = FUNCTION; rw_read_held = FUNCTION; - _cond_destroy = FUNCTION; __tls_get_addr = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; thr_continue_allmutators = FUNCTION; - _rw_unlock = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _thr_getprio = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; rw_write_held = FUNCTION; - _cond_signal = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_condattr_destroy = FUNCTION; _thr_mutators_barrier = FUNCTION; - _cond_broadcast = FUNCTION; - _thr_setconcurrency = FUNCTION; - _rw_wrlock = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; sema_held = FUNCTION; }; diff --git a/usr/src/lib/libthread/sparc/mapfile-vers b/usr/src/lib/libthread/sparc/mapfile-vers index 080f7f1afa..eee3837ee6 100644 --- a/usr/src/lib/libthread/sparc/mapfile-vers +++ b/usr/src/lib/libthread/sparc/mapfile-vers @@ -1,7 +1,4 @@ # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the @@ -21,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -263,97 +263,10 @@ SISCD_2.3b { SUNWprivate_1.1 { global: - _pthread_rwlock_trywrlock = FUNCTION; _resume = FUNCTION; _resume_ret = FUNCTION; - _canceloff = FUNCTION; - _cancelon = FUNCTION; - __pthread_min_stack = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; _pthread_setcleanupinit = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; - _pthread_create = FUNCTION; - _pthread_join = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_once = FUNCTION; - _pthread_equal = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_getspecific = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_exit = FUNCTION; - _pthread_kill = FUNCTION; - _pthread_self = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_testcancel = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_attr_getscope = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_condattr_destroy = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _pthread_cond_init = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_mutex_trylock = FUNCTION; - _pthread_cond_destroy = FUNCTION; - _pthread_cond_wait = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; - _pthread_cond_signal = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _pthread_getconcurrency = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_rwlock_init = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; thr_probe_setup = FUNCTION; - __thr_door_unbind = FUNCTION; - _thr_detach = FUNCTION; - _thr_key_delete = FUNCTION; _thr_continue_allmutators = FUNCTION; _thr_continue_mutator = FUNCTION; _thr_getstate = FUNCTION; @@ -374,63 +287,29 @@ SUNWprivate_1.1 { thr_suspend_allmutators = FUNCTION; thr_suspend_mutator = FUNCTION; thr_wait_mutator = FUNCTION; - _cond_broadcast = FUNCTION; - _cond_init = FUNCTION; - _cond_destroy = FUNCTION; - _cond_signal = FUNCTION; - _cond_timedwait = FUNCTION; - _cond_reltimedwait = FUNCTION; - _cond_wait = FUNCTION; _mutex_destroy = FUNCTION; _mutex_init = FUNCTION; _mutex_lock = FUNCTION; - _mutex_trylock = FUNCTION; _mutex_unlock = FUNCTION; - _rw_rdlock = FUNCTION; - _rw_tryrdlock = FUNCTION; - _rw_trywrlock = FUNCTION; - _rw_unlock = FUNCTION; - _rw_wrlock = FUNCTION; - _rwlock_init = FUNCTION; - _sema_init = FUNCTION; _sema_destroy = FUNCTION; - _sema_post = FUNCTION; - _sema_trywait = FUNCTION; - _sema_wait = FUNCTION; - _thr_continue = FUNCTION; _thr_create = FUNCTION; - _thr_exit = FUNCTION; - _thr_getconcurrency = FUNCTION; - _thr_getprio = FUNCTION; _thr_getspecific = FUNCTION; _thr_join = FUNCTION; _thr_keycreate = FUNCTION; - _thr_kill = FUNCTION; _thr_self = FUNCTION; - _thr_setconcurrency = FUNCTION; - _thr_setprio = FUNCTION; _thr_setspecific = FUNCTION; - _thr_sigsetmask = FUNCTION; - _thr_suspend = FUNCTION; - _thr_yield = FUNCTION; _thr_main = FUNCTION; - _thr_min_stack = FUNCTION; - _thr_stksegment = FUNCTION; __tls_get_addr = FUNCTION; - __sigtimedwait = FUNCTION; _getsp = FUNCTION; _rwlock_destroy = FUNCTION; __gettsp = FUNCTION; _assfail = FUNCTION; _sigoff = FUNCTION; _sigon = FUNCTION; - __nanosleep = FUNCTION; _fork = FUNCTION; - _fork1 = FUNCTION; _setcontext = FUNCTION; _sigaction = FUNCTION NODIRECT; _sigprocmask = FUNCTION; - _sigwait = FUNCTION; _sigsuspend = FUNCTION; _sigsetjmp = FUNCTION; _sleep = FUNCTION; diff --git a/usr/src/lib/libthread/sparcv9/mapfile-vers b/usr/src/lib/libthread/sparcv9/mapfile-vers index e119d1e421..67a8d680be 100644 --- a/usr/src/lib/libthread/sparcv9/mapfile-vers +++ b/usr/src/lib/libthread/sparcv9/mapfile-vers @@ -1,7 +1,4 @@ # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# # CDDL HEADER START # # The contents of this file are subject to the terms of the @@ -21,6 +18,9 @@ # # CDDL HEADER END # +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# # ident "%Z%%M% %I% %E% SMI" # @@ -250,97 +250,10 @@ SUNW_0.7 { SUNWprivate_1.1 { global: - _pthread_rwlock_trywrlock = FUNCTION; _resume = FUNCTION; _resume_ret = FUNCTION; - _canceloff = FUNCTION; - _cancelon = FUNCTION; - __pthread_min_stack = FUNCTION; - _pthread_mutexattr_gettype = FUNCTION; - _pthread_mutexattr_settype = FUNCTION; _pthread_setcleanupinit = FUNCTION; - _pthread_rwlockattr_setpshared = FUNCTION; - _pthread_create = FUNCTION; - _pthread_join = FUNCTION; - _pthread_detach = FUNCTION; - _pthread_once = FUNCTION; - _pthread_equal = FUNCTION; - _pthread_setschedparam = FUNCTION; - _pthread_getschedparam = FUNCTION; - _pthread_getspecific = FUNCTION; - _pthread_setspecific = FUNCTION; - _pthread_key_create = FUNCTION; - _pthread_key_delete = FUNCTION; - _pthread_exit = FUNCTION; - _pthread_kill = FUNCTION; - _pthread_self = FUNCTION; - _pthread_sigmask = FUNCTION; - _pthread_cancel = FUNCTION; - _pthread_testcancel = FUNCTION; - _pthread_setcanceltype = FUNCTION; - _pthread_setcancelstate = FUNCTION; - _pthread_attr_init = FUNCTION; - _pthread_attr_destroy = FUNCTION; - _pthread_attr_setstacksize = FUNCTION; - _pthread_attr_getstacksize = FUNCTION; - _pthread_attr_setstackaddr = FUNCTION; - _pthread_attr_getstackaddr = FUNCTION; - _pthread_attr_setdetachstate = FUNCTION; - _pthread_attr_getdetachstate = FUNCTION; - _pthread_attr_setscope = FUNCTION; - _pthread_attr_getscope = FUNCTION; - _pthread_attr_setinheritsched = FUNCTION; - _pthread_attr_getinheritsched = FUNCTION; - _pthread_attr_setschedpolicy = FUNCTION; - _pthread_attr_getschedpolicy = FUNCTION; - _pthread_attr_setschedparam = FUNCTION; - _pthread_attr_getschedparam = FUNCTION; - _pthread_mutexattr_init = FUNCTION; - _pthread_mutexattr_destroy = FUNCTION; - _pthread_mutexattr_setpshared = FUNCTION; - _pthread_mutexattr_getpshared = FUNCTION; - _pthread_mutexattr_setprotocol = FUNCTION; - _pthread_mutexattr_getprotocol = FUNCTION; - _pthread_mutexattr_setprioceiling = FUNCTION; - _pthread_mutexattr_getprioceiling = FUNCTION; - _pthread_mutex_setprioceiling = FUNCTION; - _pthread_mutex_getprioceiling = FUNCTION; - _pthread_mutex_init = FUNCTION; - _pthread_condattr_init = FUNCTION; - _pthread_condattr_destroy = FUNCTION; - _pthread_condattr_setpshared = FUNCTION; - _pthread_condattr_getpshared = FUNCTION; - _pthread_cond_init = FUNCTION; - _pthread_mutex_destroy = FUNCTION; - _pthread_mutex_lock = FUNCTION; - _pthread_mutex_unlock = FUNCTION; - _pthread_mutex_trylock = FUNCTION; - _pthread_cond_destroy = FUNCTION; - _pthread_cond_wait = FUNCTION; - _pthread_cond_timedwait = FUNCTION; - _pthread_cond_reltimedwait_np = FUNCTION; - _pthread_cond_signal = FUNCTION; - _pthread_cond_broadcast = FUNCTION; - _pthread_attr_getguardsize = FUNCTION; - _pthread_attr_setguardsize = FUNCTION; - _pthread_getconcurrency = FUNCTION; - _pthread_setconcurrency = FUNCTION; - _pthread_rwlock_init = FUNCTION; - _pthread_rwlock_destroy = FUNCTION; - _pthread_rwlock_rdlock = FUNCTION; - _pthread_rwlock_tryrdlock = FUNCTION; - _pthread_rwlock_wrlock = FUNCTION; - _pthread_rwlock_unlock = FUNCTION; - _pthread_rwlockattr_init = FUNCTION; - _pthread_rwlockattr_destroy = FUNCTION; - _pthread_rwlockattr_getpshared = FUNCTION; - _pthread_mutexattr_setrobust_np = FUNCTION; - _pthread_mutexattr_getrobust_np = FUNCTION; - _pthread_mutex_consistent_np = FUNCTION; thr_probe_setup = FUNCTION; - __thr_door_unbind = FUNCTION; - _thr_detach = FUNCTION; - _thr_key_delete = FUNCTION; _thr_continue_allmutators = FUNCTION; _thr_continue_mutator = FUNCTION; _thr_getstate = FUNCTION; @@ -361,63 +274,29 @@ SUNWprivate_1.1 { thr_suspend_allmutators = FUNCTION; thr_suspend_mutator = FUNCTION; thr_wait_mutator = FUNCTION; - _cond_broadcast = FUNCTION; - _cond_init = FUNCTION; - _cond_destroy = FUNCTION; - _cond_signal = FUNCTION; - _cond_timedwait = FUNCTION; - _cond_reltimedwait = FUNCTION; - _cond_wait = FUNCTION; _mutex_destroy = FUNCTION; _mutex_init = FUNCTION; _mutex_lock = FUNCTION; - _mutex_trylock = FUNCTION; _mutex_unlock = FUNCTION; - _rw_rdlock = FUNCTION; - _rw_tryrdlock = FUNCTION; - _rw_trywrlock = FUNCTION; - _rw_unlock = FUNCTION; - _rw_wrlock = FUNCTION; - _rwlock_init = FUNCTION; - _sema_init = FUNCTION; _sema_destroy = FUNCTION; - _sema_post = FUNCTION; - _sema_trywait = FUNCTION; - _sema_wait = FUNCTION; - _thr_continue = FUNCTION; _thr_create = FUNCTION; - _thr_exit = FUNCTION; - _thr_getconcurrency = FUNCTION; - _thr_getprio = FUNCTION; _thr_getspecific = FUNCTION; _thr_join = FUNCTION; _thr_keycreate = FUNCTION; - _thr_kill = FUNCTION; _thr_self = FUNCTION; - _thr_setconcurrency = FUNCTION; - _thr_setprio = FUNCTION; _thr_setspecific = FUNCTION; - _thr_sigsetmask = FUNCTION; - _thr_suspend = FUNCTION; - _thr_yield = FUNCTION; _thr_main = FUNCTION; - _thr_min_stack = FUNCTION; - _thr_stksegment = FUNCTION; __tls_get_addr = FUNCTION; - __sigtimedwait = FUNCTION; _getsp = FUNCTION; _rwlock_destroy = FUNCTION; __gettsp = FUNCTION; _assfail = FUNCTION; _sigoff = FUNCTION; _sigon = FUNCTION; - __nanosleep = FUNCTION; _fork = FUNCTION; - _fork1 = FUNCTION; _setcontext = FUNCTION; _sigaction = FUNCTION NODIRECT; _sigprocmask = FUNCTION; - _sigwait = FUNCTION; _sigsuspend = FUNCTION; _sigsetjmp = FUNCTION; _sleep = FUNCTION; diff --git a/usr/src/lib/libtnfctl/internal.c b/usr/src/lib/libtnfctl/internal.c index 4ea4833dfd..fba6909c14 100644 --- a/usr/src/lib/libtnfctl/internal.c +++ b/usr/src/lib/libtnfctl/internal.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,9 +18,10 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1994,1999 by 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" @@ -62,12 +62,10 @@ static int inprocess_loadobj_iter(void *opq, tnfctl_ind_obj_f *obj_func, void *cd); /* - * Cause interposition on _dlclose(), dlclose(), _dlopen(), and dlopen() + * Cause interposition on dlclose() and dlopen() */ -#pragma weak _dlclose = _tnfctl_dlclose #pragma weak dlclose = _tnfctl_dlclose -#pragma weak _dlopen = _tnfctl_dlopen #pragma weak dlopen = _tnfctl_dlopen /* diff --git a/usr/src/lib/libtnfctl/mapfile-vers b/usr/src/lib/libtnfctl/mapfile-vers index 410547e1f9..59f7967656 100644 --- a/usr/src/lib/libtnfctl/mapfile-vers +++ b/usr/src/lib/libtnfctl/mapfile-vers @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -61,12 +61,6 @@ SUNWprivate_1.1 { _tnfctl_externally_traced_pid; _tnfctl_internal_tracing_flag; local: - # dlclose/_dlclose and dlopen/_dlopen are aliases of each other - # Prevent the underscore version from going into the SUNW_dynsymsort - # section. - _dlclose = NODYNSORT; - _dlopen =NODYNSORT; - # Redunce all remaining globals to local scope *; }; diff --git a/usr/src/lib/libtnfprobe/trace_init.c b/usr/src/lib/libtnfprobe/trace_init.c index d81c8bd0c9..d8161081e0 100644 --- a/usr/src/lib/libtnfprobe/trace_init.c +++ b/usr/src/lib/libtnfprobe/trace_init.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,10 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1994, by Sun Microsytems, Inc. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -65,7 +66,6 @@ extern void thr_probe_setup(void *); #pragma weak thr_probe_setup -extern int _thr_main(void); /* * Globals @@ -153,7 +153,7 @@ _tnf_trace_initialize(void) */ if ((((int(*)())dlsym(RTLD_DEFAULT, "thr_probe_setup")) != NULL) && - (_thr_main() == -1)) { + (thr_main() == -1)) { return (0); } @@ -182,7 +182,7 @@ _tnf_trace_initialize(void) } /* try creating it rather than opening it */ fd = open(tnf_trace_file_name, - O_CREAT | O_RDWR | O_TRUNC, TNF_FILE_MODE); + O_CREAT | O_RDWR | O_TRUNC, TNF_FILE_MODE); if (fd < 0) { goto SetBroken; } @@ -204,8 +204,7 @@ _tnf_trace_initialize(void) /* mmap the file */ if ((file_start = mmap(0, tnf_trace_file_size, - PROT_READ | PROT_WRITE, MAP_SHARED, - fd, 0)) == (caddr_t) - 1) { + PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == (caddr_t)-1) { goto SetBroken; } if (created_file == 1) { @@ -215,7 +214,7 @@ _tnf_trace_initialize(void) _tnfw_b_control->tnf_buffer = file_start; if (tnfw_b_init_buffer(file_start, tnf_trace_file_size / TNF_BLOCK_SIZE, - TNF_BLOCK_SIZE, B_TRUE) != TNFW_B_OK) { + TNF_BLOCK_SIZE, B_TRUE) != TNFW_B_OK) { goto SetBroken; } @@ -236,7 +235,7 @@ SetBroken: */ void -_tnf_sched_init(tnf_schedule_t * sched, hrtime_t t) +_tnf_sched_init(tnf_schedule_t *sched, hrtime_t t) { thread_t tid = 0; diff --git a/usr/src/lib/libtsnet/common/tnmlp.c b/usr/src/lib/libtsnet/common/tnmlp.c index ea4e1c2fc9..1eb40f6cb4 100644 --- a/usr/src/lib/libtsnet/common/tnmlp.c +++ b/usr/src/lib/libtsnet/common/tnmlp.c @@ -18,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" -#include "synonyms.h" -#include <sys/types.h> -#include <sys/syscall.h> -#include <libtsnet.h> -#include <sys/tsol/tsyscall.h> +#include <sys/types.h> +#include <sys/syscall.h> +#include <libtsnet.h> +#include <sys/tsol/tsyscall.h> /* * tnmlp(2TSOL) - manipulate kernel trusted network multilevel port @@ -38,10 +38,6 @@ * This is the library interface to the system call. */ -#ifdef __STDC__ -#pragma weak tnmlp = _tnmlp -#endif - int tnmlp(int cmd, tsol_mlpent_t *buf) { diff --git a/usr/src/lib/libtsnet/common/tnrh.c b/usr/src/lib/libtsnet/common/tnrh.c index 3213005cc9..95221376c0 100644 --- a/usr/src/lib/libtsnet/common/tnrh.c +++ b/usr/src/lib/libtsnet/common/tnrh.c @@ -18,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" -#include "synonyms.h" -#include <sys/types.h> -#include <sys/syscall.h> -#include <libtsnet.h> -#include <sys/tsol/tsyscall.h> +#include <sys/types.h> +#include <sys/syscall.h> +#include <libtsnet.h> +#include <sys/tsol/tsyscall.h> /* * tnrh(2TSOL) - manipulate kernel trusted network remote hosts cache @@ -37,10 +37,6 @@ * This is the library interface to the system call. */ -#ifdef __STDC__ -#pragma weak tnrh = _tnrh -#endif - int tnrh(int cmd, tsol_rhent_t *buf) { diff --git a/usr/src/lib/libtsnet/common/tnrhtp.c b/usr/src/lib/libtsnet/common/tnrhtp.c index 9591b6ad60..40467695ad 100644 --- a/usr/src/lib/libtsnet/common/tnrhtp.c +++ b/usr/src/lib/libtsnet/common/tnrhtp.c @@ -18,18 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 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" -#include "synonyms.h" -#include <sys/types.h> -#include <sys/syscall.h> -#include <libtsnet.h> -#include <sys/tsol/tsyscall.h> +#include <sys/types.h> +#include <sys/syscall.h> +#include <libtsnet.h> +#include <sys/tsol/tsyscall.h> /* * tnrhtp(2TSOL) - manipulate kernel trusted network remote host @@ -38,10 +38,6 @@ * This is the library interface to the system call. */ -#ifdef __STDC__ -#pragma weak tnrhtp = _tnrhtp -#endif - int tnrhtp(int cmd, tsol_tpent_t *buf) { diff --git a/usr/src/lib/libumem/Makefile.com b/usr/src/lib/libumem/Makefile.com index bb914af280..6306d194e0 100644 --- a/usr/src/lib/libumem/Makefile.com +++ b/usr/src/lib/libumem/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -137,8 +137,8 @@ DTS_ERRNO= # We need to rename some standard functions so we can easily implement them # in consumers. STAND_RENAMED_FUNCS= \ - _atomic_add_64 \ - _atomic_add_32_nv \ + atomic_add_64 \ + atomic_add_32_nv \ snprintf \ vsnprintf diff --git a/usr/src/lib/libumem/common/envvar.c b/usr/src/lib/libumem/common/envvar.c index 28f2d80a77..949d33ce16 100644 --- a/usr/src/lib/libumem/common/envvar.c +++ b/usr/src/lib/libumem/common/envvar.c @@ -26,7 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <ctype.h> #include <errno.h> #include <limits.h> diff --git a/usr/src/lib/libumem/common/getpcstack.c b/usr/src/lib/libumem/common/getpcstack.c index 1fd3c7e0a7..8c3a47e19f 100644 --- a/usr/src/lib/libumem/common/getpcstack.c +++ b/usr/src/lib/libumem/common/getpcstack.c @@ -26,7 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include "misc.h" #include <ucontext.h> #include <sys/frame.h> diff --git a/usr/src/lib/libumem/common/init_lib.c b/usr/src/lib/libumem/common/init_lib.c index 797824e6d5..dd5500a13c 100644 --- a/usr/src/lib/libumem/common/init_lib.c +++ b/usr/src/lib/libumem/common/init_lib.c @@ -30,7 +30,6 @@ * Initialization routines for the library version of libumem. */ -#include "c_synonyms.h" #include "umem_base.h" #include "vmem_base.h" #include <unistd.h> diff --git a/usr/src/lib/libumem/common/linktest_stand.c b/usr/src/lib/libumem/common/linktest_stand.c index 1552b487aa..8ae9fdbec8 100644 --- a/usr/src/lib/libumem/common/linktest_stand.c +++ b/usr/src/lib/libumem/common/linktest_stand.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,9 +32,9 @@ */ void __umem_assert_failed(void) {} -void _atomic_add_64(void) {} -void _atomic_add_32_nv(void) {} -void _dladdr1(void) {} +void atomic_add_64(void) {} +void atomic_add_32_nv(void) {} +void dladdr1(void) {} void bcopy(void) {} void bzero(void) {} void exit(void) {} diff --git a/usr/src/lib/libumem/common/malloc.c b/usr/src/lib/libumem/common/malloc.c index a309455cdd..906f369d29 100644 --- a/usr/src/lib/libumem/common/malloc.c +++ b/usr/src/lib/libumem/common/malloc.c @@ -26,10 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#if !defined(UMEM_STANDALONE) -#include "c_synonyms.h" -#endif - #include <unistd.h> #include <errno.h> #include <string.h> diff --git a/usr/src/lib/libumem/common/misc.c b/usr/src/lib/libumem/common/misc.c index d0d945cade..a3da9e5b05 100644 --- a/usr/src/lib/libumem/common/misc.c +++ b/usr/src/lib/libumem/common/misc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,12 @@ */ /* - * Copyright 2006 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" -#include "c_synonyms.h" #include <unistd.h> #include <dlfcn.h> #include <signal.h> diff --git a/usr/src/lib/libumem/common/stub_stand.c b/usr/src/lib/libumem/common/stub_stand.c index add48bcc12..025001ff73 100644 --- a/usr/src/lib/libumem/common/stub_stand.c +++ b/usr/src/lib/libumem/common/stub_stand.c @@ -35,21 +35,21 @@ /*ARGSUSED*/ int -_cond_init(cond_t *cvp, int type, void *arg) +cond_init(cond_t *cvp, int type, void *arg) { return (0); } /*ARGSUSED*/ int -_cond_destroy(cond_t *cvp) +cond_destroy(cond_t *cvp) { return (0); } /*ARGSUSED*/ int -_cond_wait(cond_t *cv, mutex_t *mutex) +cond_wait(cond_t *cv, mutex_t *mutex) { umem_panic("attempt to wait on standumem cv %p", cv); @@ -59,20 +59,20 @@ _cond_wait(cond_t *cv, mutex_t *mutex) /*ARGSUSED*/ int -_cond_broadcast(cond_t *cvp) +cond_broadcast(cond_t *cvp) { return (0); } /*ARGSUSED*/ int -_pthread_setcancelstate(int state, int *oldstate) +pthread_setcancelstate(int state, int *oldstate) { return (0); } thread_t -_thr_self(void) +thr_self(void) { return ((thread_t)1); } @@ -81,7 +81,7 @@ static mutex_t _mp = DEFAULTMUTEX; /*ARGSUSED*/ int -__mutex_init(mutex_t *mp, int type, void *arg) +mutex_init(mutex_t *mp, int type, void *arg) { (void) memcpy(mp, &_mp, sizeof (mutex_t)); return (0); @@ -89,41 +89,41 @@ __mutex_init(mutex_t *mp, int type, void *arg) /*ARGSUSED*/ int -__mutex_destroy(mutex_t *mp) +mutex_destroy(mutex_t *mp) { return (0); } /*ARGSUSED*/ int -__mutex_held(mutex_t *mp) +_mutex_held(mutex_t *mp) { return (1); } /*ARGSUSED*/ int -__mutex_lock(mutex_t *mp) +mutex_lock(mutex_t *mp) { return (0); } /*ARGSUSED*/ int -__mutex_trylock(mutex_t *mp) +mutex_trylock(mutex_t *mp) { return (0); } /*ARGSUSED*/ int -__mutex_unlock(mutex_t *mp) +mutex_unlock(mutex_t *mp) { return (0); } int -_issetugid(void) +issetugid(void) { return (1); } diff --git a/usr/src/lib/libumem/common/umem.c b/usr/src/lib/libumem/common/umem.c index c740fddbbd..a3eb0b8e6c 100644 --- a/usr/src/lib/libumem/common/umem.c +++ b/usr/src/lib/libumem/common/umem.c @@ -357,7 +357,6 @@ * lh_lock */ -#include "c_synonyms.h" #include <umem_impl.h> #include <sys/vmem_impl_user.h> #include "umem_base.h" @@ -502,8 +501,7 @@ umem_log_header_t *umem_content_log; umem_log_header_t *umem_failure_log; umem_log_header_t *umem_slab_log; -extern thread_t _thr_self(void); -#define CPUHINT() (_thr_self()) +#define CPUHINT() (thr_self()) #define CPUHINT_MAX() INT_MAX #define CPU(mask) (umem_cpus + (CPUHINT() & (mask))) diff --git a/usr/src/lib/libumem/common/umem_fail.c b/usr/src/lib/libumem/common/umem_fail.c index 7a4ab7466c..ef39f1a10d 100644 --- a/usr/src/lib/libumem/common/umem_fail.c +++ b/usr/src/lib/libumem/common/umem_fail.c @@ -30,7 +30,6 @@ * Failure routines for libumem (not standalone) */ -#include "c_synonyms.h" #include <sys/types.h> #include <signal.h> #include <stdarg.h> diff --git a/usr/src/lib/libumem/common/umem_fork.c b/usr/src/lib/libumem/common/umem_fork.c index 5c3c9ff836..4cbe81dfe9 100644 --- a/usr/src/lib/libumem/common/umem_fork.c +++ b/usr/src/lib/libumem/common/umem_fork.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,12 @@ */ /* - * Copyright 2006 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" -#include "c_synonyms.h" #include "umem_base.h" #include "vmem_base.h" diff --git a/usr/src/lib/libumem/common/umem_update_thread.c b/usr/src/lib/libumem/common/umem_update_thread.c index 413f51d1f5..178c6e7334 100644 --- a/usr/src/lib/libumem/common/umem_update_thread.c +++ b/usr/src/lib/libumem/common/umem_update_thread.c @@ -26,7 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include "umem_base.h" #include "vmem_base.h" diff --git a/usr/src/lib/libumem/common/vmem.c b/usr/src/lib/libumem/common/vmem.c index 76b9b5b30d..9a51d8c606 100644 --- a/usr/src/lib/libumem/common/vmem.c +++ b/usr/src/lib/libumem/common/vmem.c @@ -108,7 +108,6 @@ * sorted in address order. */ -#include "c_synonyms.h" #include <sys/vmem_impl_user.h> #include <alloca.h> #include <sys/sysmacros.h> diff --git a/usr/src/lib/libumem/common/vmem_base.c b/usr/src/lib/libumem/common/vmem_base.c index f5fdd1da18..6b1c07e1ba 100644 --- a/usr/src/lib/libumem/common/vmem_base.c +++ b/usr/src/lib/libumem/common/vmem_base.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,13 +20,12 @@ */ /* - * Copyright 2006 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" -#include "c_synonyms.h" #include "vmem_base.h" #include "umem_base.h" diff --git a/usr/src/lib/libumem/common/vmem_mmap.c b/usr/src/lib/libumem/common/vmem_mmap.c index 32a14d47c4..41c1ee5e76 100644 --- a/usr/src/lib/libumem/common/vmem_mmap.c +++ b/usr/src/lib/libumem/common/vmem_mmap.c @@ -26,7 +26,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <unistd.h> #include <errno.h> #include <sys/mman.h> diff --git a/usr/src/lib/libumem/common/vmem_sbrk.c b/usr/src/lib/libumem/common/vmem_sbrk.c index f07c543988..20bfb73454 100644 --- a/usr/src/lib/libumem/common/vmem_sbrk.c +++ b/usr/src/lib/libumem/common/vmem_sbrk.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -51,7 +51,6 @@ * before calling sbrk(). */ -#include "c_synonyms.h" #include <errno.h> #include <limits.h> #include <sys/sysmacros.h> diff --git a/usr/src/lib/libuutil/Makefile.com b/usr/src/lib/libuutil/Makefile.com index 288f0f366c..0411ca476d 100644 --- a/usr/src/lib/libuutil/Makefile.com +++ b/usr/src/lib/libuutil/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -81,7 +81,7 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG .KEEP_STATE: -all: $(LIBS) $(NOT_NATIVE) fnamecheck +all: $(LIBS) $(NOT_NATIVE) lint: $(LINTLIB) globallint diff --git a/usr/src/lib/libuutil/common/libuutil_common.h b/usr/src/lib/libuutil/common/libuutil_common.h index 269cbc2bf5..9ebaaedfd2 100644 --- a/usr/src/lib/libuutil/common/libuutil_common.h +++ b/usr/src/lib/libuutil/common/libuutil_common.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,14 +29,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -/* - * We don't bind to the internal libc interfaces if this is a - * native build. - */ -#ifndef NATIVE_BUILD -#include "c_synonyms.h" -#endif - #include <libuutil.h> #include <libuutil_impl.h> diff --git a/usr/src/lib/libxnet/Makefile.com b/usr/src/lib/libxnet/Makefile.com index 8d36e1daa1..cd7754cf37 100644 --- a/usr/src/lib/libxnet/Makefile.com +++ b/usr/src/lib/libxnet/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -52,7 +52,7 @@ BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(PICS) .KEEP_STATE: -all: $(LIBS) fnamecheck +all: $(LIBS) lint: lintcheck diff --git a/usr/src/lib/nsswitch/dns/common/dns_common.h b/usr/src/lib/nsswitch/dns/common/dns_common.h index f60a37e436..717f56d70f 100644 --- a/usr/src/lib/nsswitch/dns/common/dns_common.h +++ b/usr/src/lib/nsswitch/dns/common/dns_common.h @@ -18,10 +18,12 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + /* * Common code and structures used by name-service-switch "dns" backends. */ @@ -73,10 +75,6 @@ extern void switch_resolver_setup(int *, sigset_t *, int *); extern void switch_resolver_reset(int, sigset_t, int); extern mutex_t one_lane; -extern int _thr_sigsetmask(int, const sigset_t *, sigset_t *); -extern int _mutex_lock(mutex_t *); -extern int _mutex_unlock(mutex_t *); - extern int ent2result(struct hostent *, nss_XbyY_args_t *, int); extern int ent2str(struct hostent *, nss_XbyY_args_t *, int); diff --git a/usr/src/lib/nsswitch/dns/common/dns_mt.c b/usr/src/lib/nsswitch/dns/common/dns_mt.c index bf6ac565c4..128b1bde75 100644 --- a/usr/src/lib/nsswitch/dns/common/dns_mt.c +++ b/usr/src/lib/nsswitch/dns/common/dns_mt.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -113,22 +114,22 @@ _nss_dns_init(void) /* If no libresolv library, then load one */ if (res_gethostbyname == 0) { if ((reslib = - dlopen(NSS_DNS_LIBRESOLV, RTLD_LAZY|RTLD_GLOBAL)) != 0) { + dlopen(NSS_DNS_LIBRESOLV, RTLD_LAZY|RTLD_GLOBAL)) != 0) { /* Turn off /etc/hosts fall back in libresolv */ if ((f_void_ptr = (void (*)(void))dlsym(reslib, - RES_SET_NO_HOSTS_FALLBACK)) != 0) { + RES_SET_NO_HOSTS_FALLBACK)) != 0) { set_no_hosts_fallback = f_void_ptr; } if ((f_void_ptr = (void (*)(void))dlsym(reslib, - RES_SET_NO_HOSTS_FALLBACK)) != 0) { + RES_SET_NO_HOSTS_FALLBACK)) != 0) { unset_no_hosts_fallback = f_void_ptr; } /* Set number of resolver retries */ if ((override_retry = (int (*)(int))dlsym(reslib, - RES_OVERRIDE_RETRY)) == 0) { + RES_OVERRIDE_RETRY)) == 0) { set_res_retry = - (struct __res_state *(*)(void))dlsym(reslib, - RES_GET_RES); + (struct __res_state *(*)(void))dlsym(reslib, + RES_GET_RES); override_retry = __fallback_override_retry; } /* @@ -149,7 +150,7 @@ _nss_dns_init(void) } else { if ((get_h_errno = (int *(*)(void))dlsym(reslib, - RES_GET_H_ERRNO)) == 0) { + RES_GET_H_ERRNO)) == 0) { get_h_errno = __fallback_h_errno; } /* @@ -159,7 +160,7 @@ _nss_dns_init(void) if ((enable_mt = (int (*)(void))dlsym(reslib, RES_ENABLE_MT)) != 0 && (disable_mt = (int (*)(void))dlsym(reslib, - RES_DISABLE_MT)) == 0) { + RES_DISABLE_MT)) == 0) { enable_mt = 0; } } @@ -177,7 +178,7 @@ _nss_dns_init(void) override_retry = __fallback_override_retry; } if ((get_h_errno = __h_errno) == 0 && - (get_h_errno = __res_get_h_errno) == 0) { + (get_h_errno = __res_get_h_errno) == 0) { get_h_errno = __fallback_h_errno; } if (get_h_errno == __h_errno) { @@ -277,8 +278,8 @@ switch_resolver_setup(int *mt_disabled, sigset_t *oldmask, int *old_retry) { if (enable_mt == 0 || (*mt_disabled = (*enable_mt)()) != 0) { sigset_t newmask; (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, oldmask); + (void) mutex_lock(&one_lane); } /* @@ -298,8 +299,8 @@ void switch_resolver_reset(int mt_disabled, sigset_t oldmask, int old_retry) { if (mt_disabled) { - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); } else { (void) (*disable_mt)(); } diff --git a/usr/src/lib/nsswitch/dns/common/gethostent.c b/usr/src/lib/nsswitch/dns/common/gethostent.c index d6c9b54bca..648ea8ba01 100644 --- a/usr/src/lib/nsswitch/dns/common/gethostent.c +++ b/usr/src/lib/nsswitch/dns/common/gethostent.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -273,15 +273,15 @@ _nss_dns_setent(be, dummy) */ if (enable_mt == 0 || (mt_disabled = (*enable_mt)()) != 0) { (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); } _sethostent(&errp, 1); if (mt_disabled) { - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); } else { (void) (*disable_mt)(); } @@ -307,15 +307,15 @@ _nss_dns_endent(be, dummy) */ if (enable_mt == 0 || (mt_disabled = (*enable_mt)()) != 0) { (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); } _endhostent(&errp); if (mt_disabled) { - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); } else { (void) (*disable_mt)(); } @@ -339,15 +339,15 @@ _nss_dns_destr(be, dummy) if (enable_mt == 0 || (mt_disabled = (*enable_mt)()) != 0) { (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); } _endhostent(&errp); if (mt_disabled) { - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); } else { (void) (*disable_mt)(); } diff --git a/usr/src/lib/nsswitch/dns/common/gethostent6.c b/usr/src/lib/nsswitch/dns/common/gethostent6.c index 6e81ea61d9..ee85832073 100644 --- a/usr/src/lib/nsswitch/dns/common/gethostent6.c +++ b/usr/src/lib/nsswitch/dns/common/gethostent6.c @@ -18,13 +18,11 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * gethostent6.c - */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -512,15 +510,15 @@ _nss_dns_destr(be, dummy) if (enable_mt == 0 || (mt_disabled = (*enable_mt)()) != 0) { (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); } _endhostent(&errp); if (mt_disabled) { - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); } else { (void) (*disable_mt)(); } diff --git a/usr/src/lib/nsswitch/files/Makefile.com b/usr/src/lib/nsswitch/files/Makefile.com index 0f5ff82629..0d011e7807 100644 --- a/usr/src/lib/nsswitch/files/Makefile.com +++ b/usr/src/lib/nsswitch/files/Makefile.com @@ -17,16 +17,13 @@ # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END - - # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # -# lib/nsswitch/files/Makefile.com LIBRARY = libnss_files.a VERS = .1 @@ -67,4 +64,4 @@ LINTFLAGS64 += -erroff=E_GLOBAL_COULD_BE_STATIC2 LDLIBS += -lsocket -lnsl DYNLIB1 = nss_files.so$(VERS) -all: $(DYNLIB1) fnamecheck +all: $(DYNLIB1) diff --git a/usr/src/lib/nsswitch/files/common/files_common.h b/usr/src/lib/nsswitch/files/common/files_common.h index 9f7457a033..b526833022 100644 --- a/usr/src/lib/nsswitch/files/common/files_common.h +++ b/usr/src/lib/nsswitch/files/common/files_common.h @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,7 +33,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <nss_common.h> #include <nss_dbdefs.h> #include <stdio.h> diff --git a/usr/src/lib/nsswitch/files/common/gethostent.c b/usr/src/lib/nsswitch/files/common/gethostent.c index f389a56885..c2d9530a86 100644 --- a/usr/src/lib/nsswitch/files/common/gethostent.c +++ b/usr/src/lib/nsswitch/files/common/gethostent.c @@ -18,11 +18,10 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * - * files/gethostent.c -- "files" backend for nsswitch "hosts" database */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -77,13 +76,13 @@ check_name(nss_XbyY_args_t *argp, const char *line, int linelen, keyp = argp->key.name; *namep = linep; while (*keyp && linep < limit && !isspace(*linep) && - tolower(*keyp) == tolower(*linep)) { + tolower(*keyp) == tolower(*linep)) { keyp++; linep++; } if (*keyp == '\0' && (linep == limit || isspace(*linep))) { if (__nss_files_get_addr(type, addrstart, addrlen, - addrp, v6flag, addrsize)) { + addrp, v6flag, addrsize)) { *namelen = linep - *namep; return (1); } @@ -101,13 +100,13 @@ check_name(nss_XbyY_args_t *argp, const char *line, int linelen, /* compare name (case insensitive) */ keyp = argp->key.name; while (*keyp && linep < limit && !isspace(*linep) && - tolower(*keyp) == tolower(*linep)) { + tolower(*keyp) == tolower(*linep)) { keyp++; linep++; } if (*keyp == '\0' && (linep == limit || isspace(*linep))) return (__nss_files_get_addr(type, addrstart, addrlen, - addrp, v6flag, addrsize)); + addrp, v6flag, addrsize)); /* skip remainder of alias, if any */ while (linep < limit && !isspace(*linep)) @@ -157,7 +156,7 @@ __nss_files_get_addr(int af, const char *addrstart, int addrlen, return (0); } else { if ((addr_ipv4.s_addr = inet_addr(addrbuf)) == - 0xffffffffU) + 0xffffffffU) return (0); IN6_INADDR_TO_V4MAPPED(&addr_ipv4, addrpv6); } @@ -198,13 +197,13 @@ __nss_files_check_addr(int af, nss_XbyY_args_t *argp, const char *line, } addrlen = linep - addrstart; if (__nss_files_get_addr(af, addrstart, addrlen, h_addrp, - v6flag, &h_length) == 0) + v6flag, &h_length) == 0) return (0); /* Compare the address */ return (h_length == argp->key.hostaddr.len && - memcmp(h_addrp, argp->key.hostaddr.addr, - argp->key.hostaddr.len) == 0); + memcmp(h_addrp, argp->key.hostaddr.addr, + argp->key.hostaddr.len) == 0); } static int @@ -227,7 +226,6 @@ getbyaddr(be, a) return (res); } -int _inet_aton(const char *cp, struct in_addr *addr); /* * filter_ipv6 * @@ -261,7 +259,7 @@ filter_ipv6(char *instr, int lenstr) { /* extract IP address */ c = *p; *p = '\0'; - rc = _inet_aton(addrstart, &addr); + rc = inet_aton(addrstart, &addr); *p = c; if (rc == 0) @@ -299,7 +297,7 @@ getent_hosts(files_backend_ptr_t be, void *a) * These addresses have to be filtered. */ if (filter_ipv6(args->returnval, args->returnlen) - == NSS_STR_PARSE_SUCCESS) + == NSS_STR_PARSE_SUCCESS) break; /* * The entry is an IPv6 address or other errors. diff --git a/usr/src/lib/nsswitch/nis/common/getrpcent.c b/usr/src/lib/nsswitch/nis/common/getrpcent.c index a2ead8d1e9..b1882349c0 100644 --- a/usr/src/lib/nsswitch/nis/common/getrpcent.c +++ b/usr/src/lib/nsswitch/nis/common/getrpcent.c @@ -18,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * nis/getrpcent.c -- "nis" backend for nsswitch "rpc" database */ @@ -78,11 +81,11 @@ getbyname(be, a) sigset_t oldmask, newmask; (void) sigfillset(&newmask); - (void) _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - (void) _mutex_lock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&no_byname_lock); no_map = no_byname_map; - (void) _mutex_unlock(&no_byname_lock); - (void) _thr_sigsetmask(SIG_SETMASK, &oldmask, (sigset_t *)NULL); + (void) mutex_unlock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, (sigset_t *)NULL); if (no_map == 0) { int yp_status; @@ -92,11 +95,11 @@ getbyname(be, a) argp->key.name, &yp_status); if (yp_status == YPERR_MAP) { (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&no_byname_lock); no_byname_map = 1; - _mutex_unlock(&no_byname_lock); - _thr_sigsetmask(SIG_SETMASK, &oldmask, + (void) mutex_unlock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, (sigset_t *)NULL); } else /* if (res == NSS_SUCCESS) <==== */ { return (res); diff --git a/usr/src/lib/nsswitch/nis/common/getservent.c b/usr/src/lib/nsswitch/nis/common/getservent.c index 13b0ea17ea..2e22bb5292 100644 --- a/usr/src/lib/nsswitch/nis/common/getservent.c +++ b/usr/src/lib/nsswitch/nis/common/getservent.c @@ -18,10 +18,13 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * + */ + +/* * nis/getservent.c -- "nis" backend for nsswitch "services" database */ @@ -106,7 +109,7 @@ check_name2(nss_XbyY_args_t *argp) } else { /* compare protocol */ while (*keyp && linep < limit && !isspace(*linep) && - *keyp == *linep) { + *keyp == *linep) { keyp++; linep++; } @@ -128,7 +131,7 @@ check_name2(nss_XbyY_args_t *argp) /* compare with the alias name */ keyp = argp->key.serv.serv.name; while (*keyp && linep < limit && !isspace(*linep) && - *keyp == *linep) { + *keyp == *linep) { keyp++; linep++; } @@ -157,11 +160,11 @@ getbyname(be, a) sigset_t oldmask, newmask; (void) sigfillset(&newmask); - (void) _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - (void) _mutex_lock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&no_byname_lock); no_map = no_byname_map; - (void) _mutex_unlock(&no_byname_lock); - (void) _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); if (no_map == 0) { int yp_status; @@ -185,11 +188,11 @@ getbyname(be, a) if (yp_status == YPERR_MAP) { (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&no_byname_lock); no_byname_map = 1; - _mutex_unlock(&no_byname_lock); - _thr_sigsetmask(SIG_SETMASK, &oldmask, + (void) mutex_unlock(&no_byname_lock); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, (sigset_t *)NULL); } else /* if (res == NSS_SUCCESS) <==== */ { return (res); diff --git a/usr/src/lib/nsswitch/nis/common/nis_common.c b/usr/src/lib/nsswitch/nis/common/nis_common.c index e90d82eb13..6a4e6b4c13 100644 --- a/usr/src/lib/nsswitch/nis/common/nis_common.c +++ b/usr/src/lib/nsswitch/nis/common/nis_common.c @@ -18,12 +18,12 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - /* * nis_common.c * @@ -163,14 +163,14 @@ _nss_nis_ypmatch(domain, map, key, valp, vallenp, ypstatusp) sigset_t oldmask, newmask; (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); #endif ypstatus = __yp_match_cflookup((grrr)domain, (grrr)map, (grrr)key, (int)strlen(key), valp, vallenp, 0); #if MT_UNSAFE_YP - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); #endif if (ypstatusp != 0) { @@ -199,14 +199,14 @@ _nss_nis_ypmatch_rsvdport(domain, map, key, valp, vallenp, ypstatusp) sigset_t oldmask, newmask; (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); #endif ypstatus = __yp_match_rsvdport_cflookup((grrr)domain, (grrr)map, (grrr)key, strlen(key), valp, vallenp, 0); #if MT_UNSAFE_YP - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); #endif if (ypstatusp != 0) { @@ -322,8 +322,8 @@ do_getent(be, args, netdb) sigset_t oldmask, newmask; (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); #endif if (be->enum_key == 0) { ypstatus = __yp_first_cflookup((grrr)be->domain, @@ -338,8 +338,8 @@ do_getent(be, args, netdb) &outvallen, 0); } #if MT_UNSAFE_YP - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); #endif if ((res = switch_err(ypstatus, 0)) != NSS_SUCCESS) { @@ -461,14 +461,14 @@ _nss_nis_do_all(be, args, filter, func) sigset_t oldmask, newmask; (void) sigfillset(&newmask); - _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - _mutex_lock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&one_lane); #endif ypall_status = __yp_all_cflookup((grrr)be->domain, (grrr) be->enum_map, &cback, 0); #if MT_UNSAFE_YP - _mutex_unlock(&one_lane); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&one_lane); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); #endif switch (ypall_status) { @@ -579,23 +579,23 @@ _nss_nis_domain() sigset_t oldmask, newmask; (void) sigfillset(&newmask); - (void) _thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); - (void) _mutex_lock(&yp_domain_lock); + (void) thr_sigsetmask(SIG_SETMASK, &newmask, &oldmask); + (void) mutex_lock(&yp_domain_lock); if ((domain = yp_domain) == 0) { #if MT_UNSAFE_YP - _mutex_lock(&one_lane); + (void) mutex_lock(&one_lane); #endif if (yp_get_default_domain(&yp_domain) == 0) { domain = yp_domain; } #if MT_UNSAFE_YP - _mutex_unlock(&one_lane); + (void) mutex_unlock(&one_lane); #endif } - _mutex_unlock(&yp_domain_lock); - _thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); + (void) mutex_unlock(&yp_domain_lock); + (void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL); return (domain); } @@ -667,7 +667,7 @@ _nss_nis_check_name_aliases(nss_XbyY_args_t *argp, const char *line, /* compare with the alias name */ keyp = argp->key.name; while (*keyp && linep < limit && !isspace(*linep) && - *keyp == *linep) { + *keyp == *linep) { keyp++; linep++; } diff --git a/usr/src/lib/nsswitch/nis/common/nis_common.h b/usr/src/lib/nsswitch/nis/common/nis_common.h index ad5407700e..7aaf6c4989 100644 --- a/usr/src/lib/nsswitch/nis/common/nis_common.h +++ b/usr/src/lib/nsswitch/nis/common/nis_common.h @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -112,9 +113,7 @@ extern nss_status_t _nss_nis_ypmatch(const char *domain, int *yp_statusp); extern const char *_nss_nis_domain(); extern int __nss2herrno(nss_status_t nsstat); -extern int _thr_sigsetmask(int how, const sigset_t *set, sigset_t *oset); -extern int _mutex_lock(mutex_t *mp); -extern int _mutex_unlock(mutex_t *mp); +extern int thr_sigsetmask(int how, const sigset_t *set, sigset_t *oset); extern int _nss_nis_check_name_aliases(nss_XbyY_args_t *argp, const char *line, int linelen); diff --git a/usr/src/lib/nsswitch/nisplus/common/getspent.c b/usr/src/lib/nsswitch/nisplus/common/getspent.c index 06a4719546..025a43e3b2 100644 --- a/usr/src/lib/nsswitch/nisplus/common/getspent.c +++ b/usr/src/lib/nsswitch/nisplus/common/getspent.c @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -52,8 +53,6 @@ extern int key_secretkey_is_set_g(); * threaded, note dtlogin is now linked with libthread (bugid 4263325) * which is why this bug exists (Note thr_main() check was removed) */ -extern int _mutex_lock(mutex_t *mp); -extern int _mutex_unlock(mutex_t *mp); static mutex_t one_lane = DEFAULTMUTEX; @@ -74,7 +73,7 @@ getbynam(be, a) char *save_buf; /* part of fix for bugid 4301477 */ - _mutex_lock(&one_lane); + (void) mutex_lock(&one_lane); /* * There is a dirty little private protocol with the nis_object2str() @@ -149,7 +148,7 @@ getbynam(be, a) out: /* end of fix for bugid 4301477 unlock NIS+/getspnam() */ - _mutex_unlock(&one_lane); + (void) mutex_unlock(&one_lane); argp->key.name = username; return (status); diff --git a/usr/src/lib/nsswitch/nisplus/common/nisplus_common.h b/usr/src/lib/nsswitch/nisplus/common/nisplus_common.h index 5c6ae11c8c..b446c0b23a 100644 --- a/usr/src/lib/nsswitch/nisplus/common/nisplus_common.h +++ b/usr/src/lib/nsswitch/nisplus/common/nisplus_common.h @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -133,7 +134,7 @@ extern nss_status_t _nss_nisplus_list(const char *name, int extra_flags, nis_result **r); extern int __nis_parse_path(); -extern int _thr_main(void); +extern int thr_main(void); extern int __nss2herrno(); extern char *inet_ntoa_r(); diff --git a/usr/src/lib/nsswitch/user/Makefile.com b/usr/src/lib/nsswitch/user/Makefile.com index df1c209dfc..befd4172a7 100644 --- a/usr/src/lib/nsswitch/user/Makefile.com +++ b/usr/src/lib/nsswitch/user/Makefile.com @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -44,4 +44,4 @@ LINTFLAGS64 += -erroff=E_GLOBAL_COULD_BE_STATIC2 -erroff=E_FUNC_SET_NOT_USED DYNLIB1 = nss_user.so$(VERS) -all: $(DYNLIB1) fnamecheck +all: $(DYNLIB1) diff --git a/usr/src/lib/nsswitch/user/common/user_common.h b/usr/src/lib/nsswitch/user/common/user_common.h index 2f1b79a42f..e6f7359c65 100644 --- a/usr/src/lib/nsswitch/user/common/user_common.h +++ b/usr/src/lib/nsswitch/user/common/user_common.h @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,7 +33,6 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#include "c_synonyms.h" #include <nss_common.h> #include <nss_dbdefs.h> #include <stdio.h> diff --git a/usr/src/lib/rpcsec_gss/rpcsec_gss.c b/usr/src/lib/rpcsec_gss/rpcsec_gss.c index 480532ccb5..59bbebfff1 100644 --- a/usr/src/lib/rpcsec_gss/rpcsec_gss.c +++ b/usr/src/lib/rpcsec_gss/rpcsec_gss.c @@ -20,13 +20,10 @@ */ /* - * Copyright 2007 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" - - /* * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved. * @@ -35,6 +32,8 @@ * 1.14 1995/03/22 22:07:55 jik Exp $ */ +#pragma ident "%Z%%M% %I% %E% SMI" + #include <stdio.h> #include <stdlib.h> #include <strings.h> @@ -59,11 +58,6 @@ static bool_t validate_seqwin(); * Globals that should have header files but don't. */ extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *); -extern int _thr_main(void); -extern void *_pthread_getspecific(pthread_key_t key); -typedef void (*PFrV) (void *); -extern int _thr_keycreate_once(thread_key_t *pkey, PFrV destructor); -extern int _thr_setspecific(unsigned int key, void *value); static struct auth_ops rpc_gss_ops = { @@ -584,7 +578,7 @@ validate_seqwin(rpc_gss_data *ap) tok_buf.value = ap->verifier->oa_base; major = gss_verify(&minor, ap->context, &msg_buf, &tok_buf, &qop_state); if (major != GSS_S_COMPLETE) - return (FALSE); + return (FALSE); return (TRUE); } @@ -912,14 +906,14 @@ __rpc_gss_err() static thread_key_t rpc_gss_err_key = THR_ONCE_KEY; rpc_gss_error_t *tsd; - if (_thr_main()) + if (thr_main()) return (&rpc_gss_err); - if (_thr_keycreate_once(&rpc_gss_err_key, free) != 0) + if (thr_keycreate_once(&rpc_gss_err_key, free) != 0) return (&rpc_gss_err); - tsd = _pthread_getspecific(rpc_gss_err_key); + tsd = pthread_getspecific(rpc_gss_err_key); if (tsd == NULL) { tsd = (rpc_gss_error_t *)calloc(1, sizeof (rpc_gss_error_t)); - if (_thr_setspecific(rpc_gss_err_key, tsd) != 0) { + if (thr_setspecific(rpc_gss_err_key, tsd) != 0) { if (tsd) free(tsd); return (&rpc_gss_err); diff --git a/usr/src/lib/watchmalloc/common/malloc.c b/usr/src/lib/watchmalloc/common/malloc.c index c62459c007..6e2c85112d 100644 --- a/usr/src/lib/watchmalloc/common/malloc.c +++ b/usr/src/lib/watchmalloc/common/malloc.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -58,7 +58,6 @@ * Otherwise, it is always 0. */ -#include <c_synonyms.h> #include "mallint.h" static mutex_t __watch_malloc_lock = DEFAULTMUTEX; diff --git a/usr/src/pkgdefs/SUNWcslr/prototype_com b/usr/src/pkgdefs/SUNWcslr/prototype_com index 7c30e112b9..a427ce2385 100644 --- a/usr/src/pkgdefs/SUNWcslr/prototype_com +++ b/usr/src/pkgdefs/SUNWcslr/prototype_com @@ -17,8 +17,6 @@ # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END - - # # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. @@ -47,6 +45,7 @@ i depend # d none lib 755 root bin s none lib/32=. +f none lib/c_synonyms.so.1 755 root bin f none lib/ld.so.1 755 root bin f none lib/libadm.so.1 755 root bin s none lib/libadm.so=libadm.so.1 diff --git a/usr/src/pkgdefs/SUNWcslr/prototype_i386 b/usr/src/pkgdefs/SUNWcslr/prototype_i386 index 739d6c9e7b..732f0900f6 100644 --- a/usr/src/pkgdefs/SUNWcslr/prototype_i386 +++ b/usr/src/pkgdefs/SUNWcslr/prototype_i386 @@ -17,8 +17,6 @@ # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END - - # # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. @@ -51,6 +49,7 @@ d none lib/amd64 755 root bin s none lib/64=amd64 d none lib/secure/amd64 755 root bin s none lib/secure/64=amd64 +f none lib/amd64/c_synonyms.so.1 755 root bin f none lib/amd64/ld.so.1 755 root bin s none lib/amd64/libadm.so=libadm.so.1 f none lib/amd64/libadm.so.1 755 root bin diff --git a/usr/src/pkgdefs/SUNWcslr/prototype_sparc b/usr/src/pkgdefs/SUNWcslr/prototype_sparc index 5cbfd8e0e9..ed85216ddf 100644 --- a/usr/src/pkgdefs/SUNWcslr/prototype_sparc +++ b/usr/src/pkgdefs/SUNWcslr/prototype_sparc @@ -17,8 +17,6 @@ # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END - - # # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. @@ -52,6 +50,7 @@ d none lib/secure/sparcv9 755 root bin s none lib/secure/64=sparcv9 d none lib/sparcv9 755 root bin s none lib/64=sparcv9 +f none lib/sparcv9/c_synonyms.so.1 755 root bin f none lib/sparcv9/ld.so.1 755 root bin s none lib/sparcv9/libadm.so=libadm.so.1 f none lib/sparcv9/libadm.so.1 755 root bin diff --git a/usr/src/tools/SUNWonbld/prototype_com b/usr/src/tools/SUNWonbld/prototype_com index 024d82f0b7..102bc25f53 100644 --- a/usr/src/tools/SUNWonbld/prototype_com +++ b/usr/src/tools/SUNWonbld/prototype_com @@ -18,9 +18,8 @@ # # CDDL HEADER END # - # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -61,7 +60,6 @@ f none opt/onbld/bin/bldenv 555 root bin f none opt/onbld/bin/bringovercheck 555 root bin f none opt/onbld/bin/build_cscope 555 root bin f none opt/onbld/bin/cddlchk 555 root bin -f none opt/onbld/bin/check_fnames 555 root bin f none opt/onbld/bin/check_rtime 555 root bin f none opt/onbld/bin/checkpaths 555 root bin f none opt/onbld/bin/checkproto 555 root bin diff --git a/usr/src/tools/scripts/Makefile b/usr/src/tools/scripts/Makefile index 59f17231c1..f31b760cc5 100644 --- a/usr/src/tools/scripts/Makefile +++ b/usr/src/tools/scripts/Makefile @@ -18,7 +18,6 @@ # # CDDL HEADER END # - # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. @@ -39,7 +38,6 @@ SHFILES= \ bringovercheck \ checkpaths \ checkproto \ - check_fnames \ cstyle \ elfcmp \ flg.flp \ diff --git a/usr/src/tools/tokenize/Makefile b/usr/src/tools/tokenize/Makefile index 20a5715834..db7279115d 100644 --- a/usr/src/tools/tokenize/Makefile +++ b/usr/src/tools/tokenize/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -42,7 +42,7 @@ LIBS = $(DYNLIB) MAPFILES = DYNFLAGS += $(ZINTERPOSE) -LDLIBS = -lc -ldl +LDLIBS = -lc ASFLAGS += -P -D_ASM diff --git a/usr/src/tools/tokenize/forth_preload.c b/usr/src/tools/tokenize/forth_preload.c index 62614e4a51..7a712c583f 100644 --- a/usr/src/tools/tokenize/forth_preload.c +++ b/usr/src/tools/tokenize/forth_preload.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -47,10 +47,6 @@ enum ix { ix_cfgetospeed, ix_chdir, ix_close, - ix_dlclose, - ix_dlerror, - ix_dlopen, - ix_dlsym, ix_exit, ix_exit_handler, ix_fclose, @@ -132,10 +128,6 @@ struct intpose { { "cfgetospeed", 0 }, { "chdir", 0 }, { "close", 0 }, - { "dlclose", 0 }, - { "dlerror", 0 }, - { "dlopen", 0 }, - { "dlsym", 0 }, { "exit", 0 }, { "exit_handler", 0 }, { "fclose", 0 }, @@ -202,7 +194,7 @@ struct intpose { }; #define RTLD_NEXT (void *)-1 -extern void *_dlsym(void *handle, const char *name); +extern void *dlsym(void *handle, const char *name); static long global_g7 = -1; @@ -223,7 +215,7 @@ callfunc(struct intpose *ip, set_g7(global_g7); if ((realfunc = ip->realfunc) == 0) ip->realfunc = realfunc = - (realfunc_t)_dlsym(RTLD_NEXT, ip->fname); + (realfunc_t)dlsym(RTLD_NEXT, ip->fname); rv = realfunc(a0, a1, a2, a3, a4, a5); set_g7(my_g7); return (rv); @@ -246,10 +238,6 @@ ipose(atoi) ipose(cfgetospeed) ipose(chdir) ipose(close) -ipose(dlclose) -ipose(dlerror) -ipose(dlopen) -ipose(dlsym) ipose(exit) ipose(exit_handler) ipose(fclose) diff --git a/usr/src/ucblib/libucb/port/stdio/doprnt.c b/usr/src/ucblib/libucb/port/stdio/doprnt.c index 6a9a807c29..c122567e26 100644 --- a/usr/src/ucblib/libucb/port/stdio/doprnt.c +++ b/usr/src/ucblib/libucb/port/stdio/doprnt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,13 +39,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" -/*LINTLIBRARY*/ - /* * _doprnt: common code for printf, fprintf, sprintf */ -#include "../../../lib/common/inc/c_synonyms.h" #include <sys/types.h> #include "file64.h" #include <stdio.h> @@ -272,8 +268,8 @@ _doprnt(char *format, va_list in_args, FILE *iop) /* initialize buffer pointer and buffer end pointer */ bufptr = iop->_ptr; bufferend = (iop->_flag & _IOREAD) ? - (unsigned char *)((long)bufptr | (-1L & ~HIBITL)) - : _bufend(iop); + (unsigned char *)((long)bufptr | (-1L & ~HIBITL)) + : _bufend(iop); /* * The main loop -- this loop goes through one iteration @@ -321,7 +317,7 @@ _doprnt(char *format, va_list in_args, FILE *iop) * encountered. */ width = prefixlength = otherlength = flagword = - suffixlength = 0; + suffixlength = 0; format++; charswitch: @@ -420,7 +416,8 @@ _doprnt(char *format, va_list in_args, FILE *iop) case '7': case '8': case '9': - { int num = fcode - '0'; + { + int num = fcode - '0'; while (isdigit(fcode = *format)) { num = num * 10 + fcode - '0'; format++; @@ -543,7 +540,8 @@ _doprnt(char *format, va_list in_args, FILE *iop) } decimal: - { long qval = val; + { + long qval = val; long saveq; if (qval <= 9) { @@ -554,7 +552,7 @@ _doprnt(char *format, va_list in_args, FILE *iop) saveq = qval; qval /= 10; *--bp = (char)(saveq - - qval * 10 + '0'); + qval * 10 + '0'); } while (qval > 9); *--bp = (char)(qval + '0'); pdiff = (ptrdiff_t)saveq; @@ -630,7 +628,8 @@ _doprnt(char *format, va_list in_args, FILE *iop) put_pc: /* Develop the digits of the value */ p = bp = buf + MAXDIGS; - { long qval = val; + { + long qval = val; if (qval == 0) { if (!(flagword & DOTSEEN)) { otherlength = lzero = 1; @@ -640,7 +639,7 @@ _doprnt(char *format, va_list in_args, FILE *iop) do { *--bp = tab[qval & mradix]; qval = ((qval >> 1) & ~HIBITL) - >> lradix; + >> lradix; } while (qval != 0); } @@ -741,7 +740,8 @@ _doprnt(char *format, va_list in_args, FILE *iop) *p++ = _numeric[0]; /* Create the rest of the mantissa */ - { int rz = prec; + { + int rz = prec; for (; rz > 0 && *bp != '\0'; --rz) *p++ = *bp++; if (rz > 0) { @@ -757,7 +757,7 @@ _doprnt(char *format, va_list in_args, FILE *iop) if (dval != 0) { int nn = decpt - 1; if (nn < 0) - nn = -nn; + nn = -nn; for (; nn > 9; nn /= 10) *--suffix = todigit(nn % 10); *--suffix = todigit(nn); @@ -775,7 +775,7 @@ _doprnt(char *format, va_list in_args, FILE *iop) /* compute size of suffix */ otherlength += (suffixlength = - (int)(&expbuf[MAXESIZ] - suffix)); + (int)(&expbuf[MAXESIZ] - suffix)); flagword |= SUFFIX; break; @@ -838,15 +838,15 @@ _doprnt(char *format, va_list in_args, FILE *iop) /* Initialize buffer pointer */ p = &buf[0]; - - { int nn = decpt; + { + int nn = decpt; /* Emit the digits before the decimal point */ k = 0; do { *p++ = (nn <= 0 || *bp == '\0' || - k >= MAXFSIG) ? - '0' : (k++, *bp++); + k >= MAXFSIG) ? + '0' : (k++, *bp++); } while (--nn > 0); /* Decide whether we need a decimal point */ @@ -861,8 +861,8 @@ _doprnt(char *format, va_list in_args, FILE *iop) } while (--nn >= 0) *p++ = (++decpt <= 0 || *bp == '\0' || - k >= MAXFSIG) ? - '0' : (k++, *bp++); + k >= MAXFSIG) ? + '0' : (k++, *bp++); } bp = &buf[0]; @@ -917,8 +917,8 @@ _doprnt(char *format, va_list in_args, FILE *iop) bp = ecvt(dval, min(prec, MAXECVT), &decpt, &sign); if (dval == 0) decpt = 1; - - { int kk = prec; + { + int kk = prec; size_t sz; if (!(flagword & FSHARP)) { @@ -1002,7 +1002,7 @@ _doprnt(char *format, va_list in_args, FILE *iop) /* Calculate number of padding blanks */ k = (int)(pdiff = p - bp) + prefixlength + otherlength + - NaN_flg; + NaN_flg; if (width <= k) count += k; else { diff --git a/usr/src/ucblib/libucb/sparc/sys/setjmp.s b/usr/src/ucblib/libucb/sparc/sys/setjmp.s index 86b83b2a5d..a90096c481 100644 --- a/usr/src/ucblib/libucb/sparc/sys/setjmp.s +++ b/usr/src/ucblib/libucb/sparc/sys/setjmp.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,16 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 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" + .file "%M%" + /* * The UCB setjmp(env) is the same as SYSV's sigsetjmp(env, 1) * while _setjmp(env) is the same as SYSV's sigsetjmp(env, 0) @@ -40,8 +42,6 @@ * is essential for the correct operation of sigsetjmp. */ - .file "%M%" - #include <sys/asm_linkage.h> ANSI_PRAGMA_WEAK(longjmp,function) @@ -60,8 +60,8 @@ mov %g1, %o7 SET_SIZE(_setjmp) - ENTRY_NP(_longjmp) + ENTRY_NP(longjmp) mov %o7, %g1 call _siglongjmp mov %g1, %o7 - SET_SIZE(_longjmp) + SET_SIZE(longjmp) diff --git a/usr/src/uts/common/sys/loadavg.h b/usr/src/uts/common/sys/loadavg.h index dd9a52b9e0..79de0eb887 100644 --- a/usr/src/uts/common/sys/loadavg.h +++ b/usr/src/uts/common/sys/loadavg.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,9 +18,10 @@ * * CDDL HEADER END */ + /* - * Copyright (c) 1997, by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #ifndef _SYS_LOADAVG_H @@ -50,12 +50,6 @@ extern int getloadavg(int *, int); */ extern int getloadavg(double [], int); -/* - * This is the system call that implements it. - * Do not invoke this directly. - */ -extern int __getloadavg(int *, int); - #endif /* _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/lwp.h b/usr/src/uts/common/sys/lwp.h index 8da8680bfd..1333225e65 100644 --- a/usr/src/uts/common/sys/lwp.h +++ b/usr/src/uts/common/sys/lwp.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -79,9 +79,6 @@ int _lwp_info(struct lwpinfo *); lwpid_t _lwp_self(void); int _lwp_suspend(lwpid_t); int _lwp_continue(lwpid_t); -#if defined(__i386) || defined(__amd64) -int _lwp_private(int, int, void *); -#endif /* __i386 || __amd64 */ #endif /* _KERNEL */ diff --git a/usr/src/uts/intel/ia32/sys/asm_linkage.h b/usr/src/uts/intel/ia32/sys/asm_linkage.h index 6c907826ff..ad6fbc6861 100644 --- a/usr/src/uts/intel/ia32/sys/asm_linkage.h +++ b/usr/src/uts/intel/ia32/sys/asm_linkage.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -174,15 +174,17 @@ extern "C" { /* * Macro to define weak symbol aliases. These are similar to the ANSI-C - * #pragma weak name = _name + * #pragma weak _name = name * except a compiler can determine type. The assembler must be told. Hence, * the second parameter must be the type of the symbol (i.e.: function,...) */ #define ANSI_PRAGMA_WEAK(sym, stype) \ - .weak sym; \ - .type sym, @stype; \ /* CSTYLED */ \ -sym = _/**/sym + .weak _/**/sym; \ +/* CSTYLED */ \ + .type _/**/sym, @stype; \ +/* CSTYLED */ \ +_/**/sym = sym /* * Like ANSI_PRAGMA_WEAK(), but for unrelated names, as in: diff --git a/usr/src/uts/sparc/sys/asm_linkage.h b/usr/src/uts/sparc/sys/asm_linkage.h index ff8f9201b0..a445ba0344 100644 --- a/usr/src/uts/sparc/sys/asm_linkage.h +++ b/usr/src/uts/sparc/sys/asm_linkage.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -126,15 +126,17 @@ extern "C" { /* * Macro to define weak symbol aliases. These are similar to the ANSI-C - * #pragma weak name = _name + * #pragma weak _name = name * except a compiler can determine type. The assembler must be told. Hence, * the second parameter must be the type of the symbol (i.e.: function,...) */ #define ANSI_PRAGMA_WEAK(sym, stype) \ - .weak sym; \ - .type sym, #stype; \ /* CSTYLED */ \ -sym = _/**/sym + .weak _/**/sym; \ +/* CSTYLED */ \ + .type _/**/sym, #stype; \ +/* CSTYLED */ \ +_/**/sym = sym /* * Like ANSI_PRAGMA_WEAK(), but for unrelated names, as in: |