diff options
Diffstat (limited to 'usr/src/tools')
-rw-r--r-- | usr/src/tools/ctf/cvt/ctf.c | 2 | ||||
-rw-r--r-- | usr/src/tools/ctf/cvt/dwarf.c | 2 | ||||
-rw-r--r-- | usr/src/tools/ctf/cvt/output.c | 8 | ||||
-rw-r--r-- | usr/src/tools/ctf/stabs/common/genassym.c | 7 | ||||
-rw-r--r-- | usr/src/tools/env/illumos.sh | 8 | ||||
-rw-r--r-- | usr/src/tools/protocmp/exception_list.c | 8 | ||||
-rw-r--r-- | usr/src/tools/protocmp/protocmp.c | 8 | ||||
-rw-r--r-- | usr/src/tools/protocmp/protodir.c | 5 |
8 files changed, 27 insertions, 21 deletions
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/env/illumos.sh b/usr/src/tools/env/illumos.sh index 162f1f702f..c5bf4154d9 100644 --- a/usr/src/tools/env/illumos.sh +++ b/usr/src/tools/env/illumos.sh @@ -21,6 +21,7 @@ # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2010, 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> +# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. # # Configuration variables for the runtime environment of the nightly @@ -230,6 +231,13 @@ export SPRO_VROOT="$SPRO_ROOT" # Uncomment this to disable support for SMB printing. # export ENABLE_SMB_PRINTING='#' +# If your distro uses certain versions of Perl, make sure either Makefile.master +# contains your new defaults OR your .env file sets them. +# These are how you would override for building on OmniOS r151012, for example. +#export PERL_VERSION=5.16.1 +#export PERL_ARCH=i86pc-solaris-thread-multi-64int +#export PERL_PKGVERS=-5161 + # # These checks ensure that if we accidentally run a program linked against the # proto area, that we then fail the build. 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); |