summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2015-02-09 12:45:24 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2015-02-09 12:45:24 +0000
commitbb780ca2a1eb25eea51d290828072c9efbec6ea6 (patch)
tree11ce1a5719d62426c67f75981fbfb04d41dd4082 /usr/src
parent8bf1e4f3b335466afe9b85d761b3822ec8c1a371 (diff)
parent9ef283481583d677cd2cf5449ef49b90eacc97d4 (diff)
downloadillumos-joyent-bb780ca2a1eb25eea51d290828072c9efbec6ea6.tar.gz
[illumos-gate merge]
commit 9ef283481583d677cd2cf5449ef49b90eacc97d4 5261 libm should stop using synonyms.h (fix studio build) commit ed1591688000a5d179c4ba27793cae55590c55d2 5590 improper use of NULL in tools/protocmp commit ad0b1ea5d69a45fe23c434277599e315f29a5fca 5589 improper use of NULL in tools/ctf commit 97a9db610324e7db4393415018e0e737485a94cd 4393 /etc/rpc: 100133 and 100169 should be added
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/rpcsvc/net_files/rpc26
-rw-r--r--usr/src/lib/libm/amd64/src/locallibm.il14
-rw-r--r--usr/src/lib/libm/i386/src/locallibm.il32
-rw-r--r--usr/src/lib/libm/sparc/src/locallibm.il12
-rw-r--r--usr/src/lib/libm/sparcv9/src/locallibm.il12
-rw-r--r--usr/src/lib/libmvec/Makefile.com1
-rw-r--r--usr/src/tools/ctf/cvt/ctf.c2
-rw-r--r--usr/src/tools/ctf/cvt/dwarf.c2
-rw-r--r--usr/src/tools/ctf/cvt/output.c8
-rw-r--r--usr/src/tools/ctf/stabs/common/genassym.c7
-rw-r--r--usr/src/tools/protocmp/exception_list.c8
-rw-r--r--usr/src/tools/protocmp/protocmp.c8
-rw-r--r--usr/src/tools/protocmp/protodir.c5
13 files changed, 69 insertions, 68 deletions
diff --git a/usr/src/cmd/rpcsvc/net_files/rpc b/usr/src/cmd/rpcsvc/net_files/rpc
index 9d1b728ab8..a50557dab8 100644
--- a/usr/src/cmd/rpcsvc/net_files/rpc
+++ b/usr/src/cmd/rpcsvc/net_files/rpc
@@ -1,7 +1,4 @@
#
-# Copyright 2009 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,9 +18,14 @@
#
# CDDL HEADER END
#
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
# rpc
#
-rpcbind 100000 portmap sunrpc rpcbind
+rpcbind 100000 portmap sunrpc
rstatd 100001 rstat rup perfmeter
rusersd 100002 rusers
nfs 100003 nfsprog
@@ -47,9 +49,9 @@ nlockmgr 100021
x25.inr 100022
statmon 100023
status 100024
+bootparam 100026
ypupdated 100028 ypupdate
keyserv 100029 keyserver
-bootparam 100026
sunlink_mapper 100033
tfsd 100037
nsed 100038
@@ -76,14 +78,16 @@ iproutes 100120 na.iproutes
layers 100121 na.layers
snmp 100122 na.snmp snmp-cmc snmp-synoptics snmp-unisys snmp-utk
traffic 100123 na.traffic
+nsm_addr 100133
ktkt_warnd 100134
+smserverd 100155
+fmd_adm 100169
+idmap 100172
nfs_acl 100227
+metad 100229
+metamhd 100230
sadmind 100232
+ufsd 100233
gssd 100234
-ufsd 100233 ufsd
+metamedd 100242
pcnfsd 150001
-metad 100229 metad
-metamhd 100230 metamhd
-metamedd 100242 metamedd
-smserverd 100155 smserverd
-idmap 100172 idmap
diff --git a/usr/src/lib/libm/amd64/src/locallibm.il b/usr/src/lib/libm/amd64/src/locallibm.il
index 65921d3c97..375720c84d 100644
--- a/usr/src/lib/libm/amd64/src/locallibm.il
+++ b/usr/src/lib/libm/amd64/src/locallibm.il
@@ -91,7 +91,7 @@
1: movl %edi,%eax
.end
- .inline __copysign,0
+ .inline copysign,0
movq $0x7fffffffffffffff,%rax
movdq %rax,%xmm2
andpd %xmm2,%xmm0
@@ -99,19 +99,19 @@
orpd %xmm2,%xmm0
.end
- .inline __fabs,0
+ .inline fabs,0
movq $0x7fffffffffffffff,%rax
movdq %rax,%xmm1
andpd %xmm1,%xmm0
.end
- .inline __fabsf,0
+ .inline fabsf,0
movl $0x7fffffff,%eax
movdl %eax,%xmm1
andps %xmm1,%xmm0
.end
- .inline _finite,0
+ .inline finite,0
subq $16,%rsp
movlpd %xmm0,(%rsp)
movq (%rsp),%rcx
@@ -123,16 +123,16 @@
addq $16,%rsp
.end
- .inline __signbit,0
+ .inline signbit,0
movmskpd %xmm0,%eax
andq $1,%rax
.end
- .inline __sqrt,0
+ .inline sqrt,0
sqrtsd %xmm0,%xmm0
.end
- .inline __sqrtf,0
+ .inline sqrtf,0
sqrtss %xmm0,%xmm0
.end
diff --git a/usr/src/lib/libm/i386/src/locallibm.il b/usr/src/lib/libm/i386/src/locallibm.il
index ca79724f86..bca43cb8e5 100644
--- a/usr/src/lib/libm/i386/src/locallibm.il
+++ b/usr/src/lib/libm/i386/src/locallibm.il
@@ -127,7 +127,7 @@
addl $8,%esp
.end
- .inline __ceil,0
+ .inline ceil,0
subl $8,%esp
fstcw (%esp)
fldl 8(%esp) ///
@@ -148,7 +148,7 @@
addl $8,%esp
.end
- .inline __copysign,0
+ .inline copysign,0
movl 4(%esp),%eax /// eax <-- hi_32(x)
movl 12(%esp),%ecx /// ecx <-- hi_32(y)
andl $0x7fffffff,%eax / eax <-- hi_32(abs(x))
@@ -170,17 +170,17 @@
fsqrt
.end
- .inline __fabs,0
+ .inline fabs,0
fldl (%esp) ///
fabs
.end
- .inline __fabsf,0
+ .inline fabsf,0
flds (%esp)
fabs
.end
- .inline __fabsl,0
+ .inline fabsl,0
fldt (%esp)
fabs
.end
@@ -188,7 +188,7 @@
/
/ branchless _finite
/
- .inline _finite,0
+ .inline finite,0
movl 4(%esp),%eax /// eax <-- hi_32(x)
notl %eax / not(bexp) = 0 iff bexp = all 1's
andl $0x7ff00000,%eax
@@ -196,7 +196,7 @@
shrl $31,%eax
.end
- .inline __floor,0
+ .inline floor,0
subl $8,%esp
fstcw (%esp)
fldl 8(%esp) ///
@@ -217,7 +217,7 @@
addl $8,%esp
.end
- .inline __isnanf,0
+ .inline isnanf,0
movl (%esp),%eax
andl $0x7fffffff,%eax
negl %eax
@@ -278,7 +278,7 @@
fsqrt
.end
- .inline __rint,0
+ .inline rint,0
fldl (%esp)
movl 4(%esp),%eax
andl $0x7fffffff,%eax
@@ -289,39 +289,39 @@
fwait / in case we jumped around frndint
.end
- .inline __scalbn,0
+ .inline scalbn,0
fildl 8(%esp) /// convert N to extended
fldl (%esp) /// push x
fscale
fstp %st(1)
.end
- .inline __signbit,0
+ .inline signbit,0
movl 4(%esp),%eax /// high part of x
shrl $31,%eax
.end
- .inline __signbitf,0
+ .inline signbitf,0
movl (%esp),%eax
shrl $31,%eax
.end
- .inline __sqrt,0
+ .inline sqrt,0
fldl (%esp)
fsqrt
.end
- .inline __sqrtf,0
+ .inline sqrtf,0
flds (%esp)
fsqrt
.end
- .inline __sqrtl,0
+ .inline sqrtl,0
fldt (%esp)
fsqrt
.end
- .inline __isnanl,0
+ .inline isnanl,0
movl 8(%esp),%eax / ax <-- sign bit and __exp
andl $0x00007fff,%eax
jz 1f / jump if __exp is all 0
diff --git a/usr/src/lib/libm/sparc/src/locallibm.il b/usr/src/lib/libm/sparc/src/locallibm.il
index 3822f5f92d..b6fa0adfc5 100644
--- a/usr/src/lib/libm/sparc/src/locallibm.il
+++ b/usr/src/lib/libm/sparc/src/locallibm.il
@@ -311,13 +311,13 @@
fsqrtd %f0,%f0
.end
- .inline __sqrtf,1
+ .inline sqrtf,1
st %o0,[%sp+0x44]
ld [%sp+0x44],%f0
fsqrts %f0,%f0
.end
- .inline __sqrt,2
+ .inline sqrt,2
std %o0,[%sp+0x48] ! store to 8-aligned address
ldd [%sp+0x48],%f0
fsqrtd %f0,%f0
@@ -814,7 +814,7 @@
.nonvolatile
.end
- .inline __fp_class,2
+ .inline fp_class,2
sethi %hi(0x80000000),%o2 ! o2 gets 80000000
andn %o0,%o2,%o0 ! o0-o1 gets abs(x)
orcc %o0,%o1,%g0 ! set cc as x is zero/nonzero
@@ -859,7 +859,7 @@
2:
.end
- .inline __fp_classf,1
+ .inline fp_classf,1
sethi %hi(0x80000000),%o2
andncc %o0,%o2,%o0
bne 1f
@@ -1229,14 +1229,14 @@
sub %o0,%o1,%o0
.end
- .inline __fabs,2
+ .inline fabs,2
st %o0,[%sp+0x48]
st %o1,[%sp+0x4c]
ldd [%sp+0x48],%f0
fabsd %f0,%f0
.end
- .inline __fabsf,1
+ .inline fabsf,1
st %o0,[%sp+0x44]
ld [%sp+0x44],%f0
fabss %f0,%f0
diff --git a/usr/src/lib/libm/sparcv9/src/locallibm.il b/usr/src/lib/libm/sparcv9/src/locallibm.il
index dcef23826a..2cd9e21470 100644
--- a/usr/src/lib/libm/sparcv9/src/locallibm.il
+++ b/usr/src/lib/libm/sparcv9/src/locallibm.il
@@ -39,11 +39,11 @@
fsqrtd %f0,%f0
.end
- .inline __sqrtf,1
+ .inline sqrtf,1
fsqrts %f1,%f0
.end
- .inline __sqrt,1
+ .inline sqrt,1
fsqrtd %f0,%f0
.end
@@ -420,7 +420,7 @@
.nonvolatile
.end
- .inline __fp_class,1
+ .inline fp_class,1
fabsd %f0,%f0
std %f0,[%sp+0x87f]
ldx [%sp+0x87f],%o0
@@ -460,7 +460,7 @@
2:
.end
- .inline __fp_classf,1
+ .inline fp_classf,1
fabss %f1,%f1
st %f1,[%sp+0x87f]
ld [%sp+0x87f],%o0
@@ -676,11 +676,11 @@
sra %o0,0,%o0
.end
- .inline __fabs,1
+ .inline fabs,1
fabsd %f0,%f0
.end
- .inline __fabsf,1
+ .inline fabsf,1
fabss %f1,%f0
.end
!
diff --git a/usr/src/lib/libmvec/Makefile.com b/usr/src/lib/libmvec/Makefile.com
index b9f39e2279..e574b0df22 100644
--- a/usr/src/lib/libmvec/Makefile.com
+++ b/usr/src/lib/libmvec/Makefile.com
@@ -179,7 +179,6 @@ FLTRPATH = $(FLTRPATH_$(TARGET_ARCH))
sparc_CFLAGS += -_cc=-W0,-xintrinsic
sparcv9_CFLAGS += -_cc=-W0,-xintrinsic
-CPPFLAGS_i386 += -Dfabs=__fabs
SRCS_mvec_i386 = ../common/__vsqrtf.c
diff --git a/usr/src/tools/ctf/cvt/ctf.c b/usr/src/tools/ctf/cvt/ctf.c
index 1e425758c2..83f09cb43e 100644
--- a/usr/src/tools/ctf/cvt/ctf.c
+++ b/usr/src/tools/ctf/cvt/ctf.c
@@ -1216,7 +1216,7 @@ decompress_ctf(caddr_t cbuf, size_t cbufsz, caddr_t dbuf, size_t dbufsz)
(rc = inflate(&zstr, Z_NO_FLUSH)) != Z_STREAM_END ||
(rc = inflateEnd(&zstr)) != Z_OK) {
warning("CTF decompress zlib error %s\n", zError(rc));
- return (NULL);
+ return (0);
}
debug(3, "reflated %lu bytes to %lu, pointer at %d\n",
diff --git a/usr/src/tools/ctf/cvt/dwarf.c b/usr/src/tools/ctf/cvt/dwarf.c
index e261818d3a..5fdcd35e33 100644
--- a/usr/src/tools/ctf/cvt/dwarf.c
+++ b/usr/src/tools/ctf/cvt/dwarf.c
@@ -1714,7 +1714,7 @@ static const die_creator_t die_creators[] = {
{ DW_TAG_variable, DW_F_NOTDP, die_variable_create },
{ DW_TAG_volatile_type, 0, die_volatile_create },
{ DW_TAG_restrict_type, 0, die_restrict_create },
- { 0, NULL }
+ { 0, 0, NULL }
};
static const die_creator_t *
diff --git a/usr/src/tools/ctf/cvt/output.c b/usr/src/tools/ctf/cvt/output.c
index f699fbf6d3..90c87dabf3 100644
--- a/usr/src/tools/ctf/cvt/output.c
+++ b/usr/src/tools/ctf/cvt/output.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Routines for preparing tdata trees for conversion into CTF data, and
* for placing the resulting data into an output file.
@@ -466,7 +464,7 @@ write_file(Elf *src, const char *srcname, Elf *dst, const char *dstname,
int pad;
int i;
- if (gelf_newehdr(dst, gelf_getclass(src)) == NULL)
+ if (gelf_newehdr(dst, gelf_getclass(src)) == 0)
elfterminate(dstname, "Cannot copy ehdr to temp file");
gelf_getehdr(src, &sehdr);
memcpy(&dehdr, &sehdr, sizeof (GElf_Ehdr));
@@ -482,7 +480,7 @@ write_file(Elf *src, const char *srcname, Elf *dst, const char *dstname,
*/
if (sehdr.e_phnum != 0) {
(void) elf_flagelf(dst, ELF_C_SET, ELF_F_LAYOUT);
- if (gelf_newphdr(dst, sehdr.e_phnum) == NULL)
+ if (gelf_newphdr(dst, sehdr.e_phnum) == 0)
elfterminate(dstname, "Cannot make phdrs in temp file");
for (i = 0; i < sehdr.e_phnum; i++) {
@@ -616,7 +614,7 @@ write_file(Elf *src, const char *srcname, Elf *dst, const char *dstname,
}
}
- if (gelf_update_shdr(dscn, &shdr) == NULL)
+ if (gelf_update_shdr(dscn, &shdr) == 0)
elfterminate(dstname, "Cannot update sect %s", sname);
new_offset = (off_t)shdr.sh_offset;
diff --git a/usr/src/tools/ctf/stabs/common/genassym.c b/usr/src/tools/ctf/stabs/common/genassym.c
index 9183e52ffd..7c1aa73b7a 100644
--- a/usr/src/tools/ctf/stabs/common/genassym.c
+++ b/usr/src/tools/ctf/stabs/common/genassym.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* In this mode, we generate header files containg various #defines which can
* be used to access members of various structures, and to walk through arrays.
@@ -182,7 +180,8 @@ ga_process_name(char *line)
if (shdef != NULL) {
ssize_t tsz;
- for (shift = -1, tsz = sz; tsz > 0; tsz >>= 1, shift++);
+ for (shift = -1, tsz = sz; tsz > 0; tsz >>= 1, shift++)
+ ;
if (shift < 0 || 1 << shift != sz) {
return (parse_warn("Can't make shift #define: %s size "
"(%d) isn't a power of 2", curname, sz));
@@ -273,7 +272,7 @@ ga_member_find(ctf_id_t curtype, ga_member_cb_data_t *md)
int rc;
if ((c = strchr(md->gmcb_memname, '.')) != NULL)
- *c++ = NULL;
+ *c++ = '\0';
md->gmcb_submem = c;
if ((rc = ctf_member_iter(ctf, curtype, ga_member_cb, md)) == 0) {
diff --git a/usr/src/tools/protocmp/exception_list.c b/usr/src/tools/protocmp/exception_list.c
index 5dd98fb6fe..f44f5296e9 100644
--- a/usr/src/tools/protocmp/exception_list.c
+++ b/usr/src/tools/protocmp/exception_list.c
@@ -22,6 +22,8 @@
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2015 PALO, Richard
*/
#include <stdio.h>
@@ -56,6 +58,10 @@ parse_exception_line(char *line, elem_list *list)
}
e = (elem *) malloc(sizeof (elem));
+ if (e == NULL) {
+ perror("malloc");
+ exit(1);
+ }
e->inode = 0;
e->perm = 0;
@@ -68,7 +74,7 @@ parse_exception_line(char *line, elem_list *list)
e->symsrc = NULL;
e->file_type = DIR_T;
- while ((e->arch = assign_arch(arch)) == NULL) {
+ while ((e->arch = assign_arch(arch)) == 0) {
if ((arch = strtok(NULL, FS)) == NULL) {
return (0);
}
diff --git a/usr/src/tools/protocmp/protocmp.c b/usr/src/tools/protocmp/protocmp.c
index a2897477cb..4cd1b56eb2 100644
--- a/usr/src/tools/protocmp/protocmp.c
+++ b/usr/src/tools/protocmp/protocmp.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -685,7 +683,7 @@ main(int argc, char **argv)
{
int errflg = 0;
int i, c;
- int list_filtered_exceptions = NULL;
+ int list_filtered_exceptions = 0;
int n_proto_refs = 0;
int n_exception_files = 0;
char *proto_refs[MAX_PROTO_REFS];
@@ -729,7 +727,7 @@ main(int argc, char **argv)
errflg++;
(void) fprintf(stderr,
"Only %d exception files supported\n",
- MAX_EXCEPTION_FILES);
+ MAX_EXCEPTION_FILES);
} else {
exception_files[n_exception_files++] = optarg;
}
@@ -745,7 +743,7 @@ main(int argc, char **argv)
errflg++;
(void) fprintf(stderr,
"Only %d proto references supported\n",
- MAX_PROTO_REFS);
+ MAX_PROTO_REFS);
} else {
proto_refs[n_proto_refs++] = optarg;
}
diff --git a/usr/src/tools/protocmp/protodir.c b/usr/src/tools/protocmp/protodir.c
index 352c36a8b2..520f5359f3 100644
--- a/usr/src/tools/protocmp/protodir.c
+++ b/usr/src/tools/protocmp/protodir.c
@@ -24,9 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-
#include <stdio.h>
#include <sys/param.h>
#include <fcntl.h>
@@ -424,7 +421,7 @@ read_pkginfo(const char *protodir, short *arch, char *basedir)
(void) fclose(pkginfo_fp);
if (architecture[0])
- if ((*arch = assign_arch(architecture)) == NULL) {
+ if ((*arch = assign_arch(architecture)) == 0) {
(void) fprintf(stderr,
"warning: Unknown architecture %s found in %s\n",
architecture, pkginfofile);