summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorJohn Sonnenschein <johns@joyent.com>2012-11-07 22:04:45 +0000
committerJohn Sonnenschein <johns@joyent.com>2012-11-07 22:04:45 +0000
commitad2a40e16d2bee59cfe84f89db3ce92b9f15adff (patch)
treebc8e23c4588b29e4602a54b72dbe2f1d8786468d /usr/src/lib
parentb5f683274309a9c6f46eea8ce5d0cca514d977a8 (diff)
parent7c45eec5760d4195b6b85770e7ac51c380adfb8a (diff)
downloadillumos-joyent-ad2a40e16d2bee59cfe84f89db3ce92b9f15adff.tar.gz
Illumos sync
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/README.mapfiles301
-rw-r--r--usr/src/lib/abi/apptrace/Makefile.com4
-rw-r--r--usr/src/lib/auditd_plugins/binfile/Makefile.com4
-rw-r--r--usr/src/lib/auditd_plugins/syslog/Makefile.com5
-rw-r--r--usr/src/lib/brand/solaris10/s10_brand/Makefile.com2
-rw-r--r--usr/src/lib/cfgadm_plugins/fp/Makefile.com6
-rw-r--r--usr/src/lib/cfgadm_plugins/fp/common/cfga_utils.c232
-rw-r--r--usr/src/lib/cfgadm_plugins/ib/Makefile.com7
-rw-r--r--usr/src/lib/cfgadm_plugins/pci/Makefile.com4
-rw-r--r--usr/src/lib/cfgadm_plugins/sata/Makefile.com6
-rw-r--r--usr/src/lib/cfgadm_plugins/sbd/Makefile.com4
-rw-r--r--usr/src/lib/cfgadm_plugins/scsi/Makefile.com6
-rw-r--r--usr/src/lib/cfgadm_plugins/scsi/SUNW,SPARC-Enterprise/Makefile.com6
-rw-r--r--usr/src/lib/cfgadm_plugins/shp/Makefile.com5
-rw-r--r--usr/src/lib/cfgadm_plugins/sysctrl/Makefile.com4
-rw-r--r--usr/src/lib/cfgadm_plugins/usb/Makefile.com7
-rw-r--r--usr/src/lib/efcode/Makefile.efcode9
-rw-r--r--usr/src/lib/efcode/efdaemon/Makefile2
-rw-r--r--usr/src/lib/efcode/interpreter/Makefile4
-rw-r--r--usr/src/lib/fm/libfmd_adm/Makefile.com1
-rw-r--r--usr/src/lib/fm/libfmd_log/Makefile.com1
-rw-r--r--usr/src/lib/fm/libfmd_msg/Makefile.com2
-rw-r--r--usr/src/lib/fm/libfmevent/Makefile.com4
-rw-r--r--usr/src/lib/fm/libldom/Makefile.com2
-rw-r--r--usr/src/lib/fm/topo/libtopo/Makefile.com3
-rw-r--r--usr/src/lib/fm/topo/modules/Makefile.plugin3
-rw-r--r--usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c2
-rw-r--r--usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com6
-rw-r--r--usr/src/lib/gss_mechs/mech_dummy/Makefile.com5
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/Makefile.com10
-rw-r--r--usr/src/lib/gss_mechs/mech_spnego/Makefile.com3
-rw-r--r--usr/src/lib/hbaapi/Makefile.com5
-rw-r--r--usr/src/lib/krb5/dyn/Makefile.com4
-rw-r--r--usr/src/lib/krb5/kadm5/clnt/Makefile.com6
-rw-r--r--usr/src/lib/krb5/kadm5/srv/Makefile.com6
-rw-r--r--usr/src/lib/krb5/kdb/Makefile.com8
-rw-r--r--usr/src/lib/krb5/plugins/kdb/db2/Makefile.com6
-rw-r--r--usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com3
-rw-r--r--usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com2
-rw-r--r--usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/Makefile.com4
-rw-r--r--usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com3
-rw-r--r--usr/src/lib/krb5/ss/Makefile.com2
-rw-r--r--usr/src/lib/libadm/Makefile.com4
-rw-r--r--usr/src/lib/libadutils/Makefile.com3
-rw-r--r--usr/src/lib/libast/Makefile.com13
-rw-r--r--usr/src/lib/libbc/sparc/Makefile9
-rw-r--r--usr/src/lib/libbe/Makefile.com5
-rw-r--r--usr/src/lib/libbsm/Makefile.com3
-rw-r--r--usr/src/lib/libc/amd64/Makefile12
-rw-r--r--usr/src/lib/libc/i386/Makefile.com12
-rw-r--r--usr/src/lib/libc/sparc/Makefile.com16
-rw-r--r--usr/src/lib/libc/sparcv9/Makefile.com16
-rw-r--r--usr/src/lib/libc_db/Makefile.com6
-rw-r--r--usr/src/lib/libcfgadm/Makefile.com4
-rw-r--r--usr/src/lib/libcmd/Makefile.com6
-rw-r--r--usr/src/lib/libcpc/Makefile.com3
-rw-r--r--usr/src/lib/libcrypt/Makefile.com5
-rw-r--r--usr/src/lib/libcryptoutil/Makefile.com3
-rw-r--r--usr/src/lib/libctf/Makefile.com5
-rw-r--r--usr/src/lib/libcurses/Makefile.com4
-rw-r--r--usr/src/lib/libdevice/Makefile.com4
-rw-r--r--usr/src/lib/libdevinfo/Makefile.com3
-rw-r--r--usr/src/lib/libdhcpagent/Makefile.com1
-rw-r--r--usr/src/lib/libdhcpdu/Makefile.com5
-rw-r--r--usr/src/lib/libdhcpsvc/Makefile.com4
-rw-r--r--usr/src/lib/libdhcputil/Makefile.com4
-rw-r--r--usr/src/lib/libdisasm/Makefile.com5
-rw-r--r--usr/src/lib/libdiskmgt/Makefile.com3
-rw-r--r--usr/src/lib/libdladm/Makefile.com4
-rw-r--r--usr/src/lib/libdll/Makefile.com3
-rw-r--r--usr/src/lib/libdlpi/Makefile.com3
-rw-r--r--usr/src/lib/libdns_sd/Makefile.com7
-rw-r--r--usr/src/lib/libdscfg/Makefile.com6
-rw-r--r--usr/src/lib/libdtrace/Makefile.com7
-rw-r--r--usr/src/lib/libdtrace_jni/Makefile.com5
-rw-r--r--usr/src/lib/libeti/form/Makefile.com6
-rw-r--r--usr/src/lib/libeti/menu/Makefile.com4
-rw-r--r--usr/src/lib/libeti/panel/Makefile.com4
-rw-r--r--usr/src/lib/libexacct/Makefile.com3
-rw-r--r--usr/src/lib/libexacct/demo/Makefile1
-rw-r--r--usr/src/lib/libfdisk/Makefile.com2
-rw-r--r--usr/src/lib/libfru/libfruraw/Makefile.com2
-rw-r--r--usr/src/lib/libfru/libfrureg/Makefile.com2
-rw-r--r--usr/src/lib/libfru/libnvfru/Makefile.com2
-rw-r--r--usr/src/lib/libfruutils/Makefile.com3
-rw-r--r--usr/src/lib/libfsmgt/Makefile.com6
-rw-r--r--usr/src/lib/libgen/Makefile.com4
-rw-r--r--usr/src/lib/libgss/Makefile.com5
-rw-r--r--usr/src/lib/libhotplug/Makefile.com2
-rw-r--r--usr/src/lib/libidmap/Makefile.com3
-rw-r--r--usr/src/lib/libima/Makefile.com7
-rw-r--r--usr/src/lib/libinetsvc/Makefile.com6
-rw-r--r--usr/src/lib/libinetutil/Makefile.com3
-rw-r--r--usr/src/lib/libinstzones/Makefile.com4
-rw-r--r--usr/src/lib/libipadm/Makefile.com2
-rw-r--r--usr/src/lib/libipmi/Makefile.com2
-rw-r--r--usr/src/lib/libipsecutil/Makefile.com3
-rw-r--r--usr/src/lib/libiscsit/Makefile.com1
-rw-r--r--usr/src/lib/libkmf/ber_der/Makefile.com2
-rw-r--r--usr/src/lib/libkmf/libkmf/Makefile.com5
-rw-r--r--usr/src/lib/libkmf/plugins/kmf_nss/Makefile.com4
-rw-r--r--usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com4
-rw-r--r--usr/src/lib/libkmf/plugins/kmf_pkcs11/Makefile.com2
-rw-r--r--usr/src/lib/libkvm/Makefile.com4
-rw-r--r--usr/src/lib/libldap5/Makefile.com11
-rw-r--r--usr/src/lib/libmapid/Makefile.com3
-rw-r--r--usr/src/lib/libmtmalloc/Makefile.com4
-rw-r--r--usr/src/lib/libndmp/Makefile.com3
-rw-r--r--usr/src/lib/libnisdb/Makefile7
-rw-r--r--usr/src/lib/libnls/Makefile.com4
-rw-r--r--usr/src/lib/libnsl/Makefile.com9
-rw-r--r--usr/src/lib/libnsl/nsl/t_error.c21
-rw-r--r--usr/src/lib/libnvpair/Makefile.com4
-rw-r--r--usr/src/lib/libnwam/Makefile.com3
-rw-r--r--usr/src/lib/libpam/Makefile.com2
-rw-r--r--usr/src/lib/libparted/Makefile.com4
-rw-r--r--usr/src/lib/libpcp/Makefile.com1
-rw-r--r--usr/src/lib/libpicltree/Makefile.com4
-rw-r--r--usr/src/lib/libpkg/Makefile.com6
-rw-r--r--usr/src/lib/libpool/Makefile.com5
-rw-r--r--usr/src/lib/libpp/Makefile.com6
-rw-r--r--usr/src/lib/libproc/Makefile.com21
-rw-r--r--usr/src/lib/libproc/amd64/Pisadep.c130
-rw-r--r--usr/src/lib/libproc/common/Pcontrol.c8
-rw-r--r--usr/src/lib/libproc/common/Pcontrol.h12
-rw-r--r--usr/src/lib/libproc/common/Pcore.c24
-rw-r--r--usr/src/lib/libproc/common/Pfdinfo.c168
-rw-r--r--usr/src/lib/libproc/common/Pgcore.c28
-rw-r--r--usr/src/lib/libproc/common/libproc.h7
-rw-r--r--usr/src/lib/libproc/common/mapfile-vers2
-rw-r--r--usr/src/lib/libproject/Makefile.com4
-rw-r--r--usr/src/lib/libprtdiag/Makefile.com7
-rw-r--r--usr/src/lib/libprtdiag_psr/sparc/Makefile.com6
-rw-r--r--usr/src/lib/libraidcfg/Makefile.com1
-rw-r--r--usr/src/lib/librcm/Makefile.com4
-rw-r--r--usr/src/lib/librdc/Makefile.com4
-rw-r--r--usr/src/lib/libresolv/Makefile9
-rw-r--r--usr/src/lib/libresolv2/Makefile.com3
-rw-r--r--usr/src/lib/librpcsvc/Makefile.com7
-rw-r--r--usr/src/lib/librsm/Makefile.com5
-rw-r--r--usr/src/lib/libscf/Makefile.com6
-rw-r--r--usr/src/lib/libsec/Makefile.com7
-rw-r--r--usr/src/lib/libsecdb/Makefile.com5
-rw-r--r--usr/src/lib/libshare/Makefile.com4
-rw-r--r--usr/src/lib/libshare/autofs/Makefile.com6
-rw-r--r--usr/src/lib/libshare/nfs/Makefile.com6
-rw-r--r--usr/src/lib/libshare/smb/Makefile.com5
-rw-r--r--usr/src/lib/libshare/smbfs/Makefile.com6
-rw-r--r--usr/src/lib/libshell/Makefile.com12
-rw-r--r--usr/src/lib/libsldap/Makefile.com7
-rw-r--r--usr/src/lib/libsldap/common/ns_connect.c12
-rw-r--r--usr/src/lib/libsldap/common/ns_standalone.c2
-rw-r--r--usr/src/lib/libslp/Makefile.com5
-rw-r--r--usr/src/lib/libsmbfs/Makefile.com3
-rw-r--r--usr/src/lib/libsmedia/library/Makefile.com4
-rw-r--r--usr/src/lib/libsocket/Makefile.com5
-rw-r--r--usr/src/lib/libsqlite/Makefile.com7
-rw-r--r--usr/src/lib/libstmf/Makefile.com2
-rw-r--r--usr/src/lib/libsum/Makefile.com2
-rw-r--r--usr/src/lib/libsun_ima/Makefile.com7
-rw-r--r--usr/src/lib/libtecla/Makefile.com4
-rw-r--r--usr/src/lib/libtnf/Makefile2
-rw-r--r--usr/src/lib/libtnfctl/Makefile.com6
-rw-r--r--usr/src/lib/libtnfprobe/Makefile.com4
-rw-r--r--usr/src/lib/libtsnet/Makefile.com3
-rw-r--r--usr/src/lib/libtsol/Makefile.com2
-rw-r--r--usr/src/lib/libumem/Makefile.com3
-rw-r--r--usr/src/lib/libunistat/Makefile.com7
-rw-r--r--usr/src/lib/libv12n/Makefile.com2
-rw-r--r--usr/src/lib/libvolmgt/Makefile.com4
-rw-r--r--usr/src/lib/libwanboot/Makefile.com6
-rw-r--r--usr/src/lib/libwanbootutil/Makefile.com6
-rw-r--r--usr/src/lib/libwrap/Makefile.com14
-rw-r--r--usr/src/lib/libxcurses/Makefile.com7
-rw-r--r--usr/src/lib/libxcurses2/Makefile.com4
-rw-r--r--usr/src/lib/libzdoor/Makefile.com17
-rw-r--r--usr/src/lib/libzfs/Makefile.com5
-rw-r--r--usr/src/lib/libzfs/common/llib-lzfs8
-rw-r--r--usr/src/lib/libzfs_jni/Makefile.com4
-rw-r--r--usr/src/lib/libzonecfg/Makefile.com3
-rw-r--r--usr/src/lib/libzonestat/Makefile.com2
-rw-r--r--usr/src/lib/libzpool/Makefile.com9
-rw-r--r--usr/src/lib/libzpool/common/kernel.c68
-rw-r--r--usr/src/lib/libzpool/common/sys/zfs_context.h61
-rw-r--r--usr/src/lib/lvm/Makefile.lvm7
-rw-r--r--usr/src/lib/madv/Makefile.com5
-rw-r--r--usr/src/lib/mpapi/libmpapi/Makefile.com6
-rw-r--r--usr/src/lib/mpss/Makefile.com5
-rw-r--r--usr/src/lib/nsswitch/Makefile.com8
-rw-r--r--usr/src/lib/nsswitch/ldap/common/getgrent.c109
-rw-r--r--usr/src/lib/pam_modules/authtok_check/Makefile.com5
-rw-r--r--usr/src/lib/pam_modules/dhkeys/Makefile.com2
-rw-r--r--usr/src/lib/pam_modules/krb5/Makefile.com3
-rw-r--r--usr/src/lib/pam_modules/krb5_migrate/Makefile.com3
-rw-r--r--usr/src/lib/pam_modules/ldap/Makefile.com3
-rw-r--r--usr/src/lib/pam_modules/unix_account/Makefile.com5
-rw-r--r--usr/src/lib/pam_modules/unix_cred/Makefile.com6
-rw-r--r--usr/src/lib/passwdutil/Makefile.com4
-rw-r--r--usr/src/lib/pkcs11/libpkcs11/Makefile.com3
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile4
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/capabilities/intel/i386/Makefile2
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4u/Makefile.com4
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4v/Makefile.com4
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile4
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile5
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile5
-rw-r--r--usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com5
-rw-r--r--usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com7
-rw-r--r--usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com4
-rw-r--r--usr/src/lib/policykit/Makefile.com4
-rw-r--r--usr/src/lib/pysolaris/Makefile.com2
-rw-r--r--usr/src/lib/pyzfs/Makefile.com2
-rw-r--r--usr/src/lib/rpcsec_gss/Makefile.com7
-rw-r--r--usr/src/lib/sasl_plugins/Makefile.com2
-rw-r--r--usr/src/lib/scsi/libscsi/Makefile.com4
-rw-r--r--usr/src/lib/scsi/libses/Makefile.defs11
-rw-r--r--usr/src/lib/scsi/libsmp/Makefile.com11
-rw-r--r--usr/src/lib/scsi/plugins/ses/SUN-Storage-J4400/Makefile.com3
-rw-r--r--usr/src/lib/scsi/plugins/ses/ses2/Makefile.com3
-rw-r--r--usr/src/lib/scsi/plugins/smp/sas2/Makefile.com2
-rw-r--r--usr/src/lib/smbsrv/libmlsvc/Makefile.com3
-rw-r--r--usr/src/lib/smbsrv/libsmb/Makefile.com3
-rw-r--r--usr/src/lib/smbsrv/libsmb/common/mapfile-vers3
-rw-r--r--usr/src/lib/smbsrv/libsmbns/Makefile.com2
-rw-r--r--usr/src/lib/smhba/Makefile.com4
-rw-r--r--usr/src/lib/smhba/common/SMHBAAPILIB.c6
-rw-r--r--usr/src/lib/storage/liba5k/Makefile.com3
-rw-r--r--usr/src/lib/storage/libg_fc/Makefile.com3
-rw-r--r--usr/src/lib/sun_fc/common/FCHBA.cc2
-rw-r--r--usr/src/lib/sun_fc/common/TgtFCHBA.cc2
-rw-r--r--usr/src/lib/sun_sas/Makefile.com7
-rw-r--r--usr/src/lib/sun_sas/common/sun_sas.c2
-rw-r--r--usr/src/lib/udapl/libdat/Makefile.com4
-rw-r--r--usr/src/lib/udapl/udapl_tavor/Makefile.com4
-rw-r--r--usr/src/lib/watchmalloc/Makefile.com4
235 files changed, 1729 insertions, 503 deletions
diff --git a/usr/src/lib/README.mapfiles b/usr/src/lib/README.mapfiles
index c94ffe8b91..560226938e 100644
--- a/usr/src/lib/README.mapfiles
+++ b/usr/src/lib/README.mapfiles
@@ -22,8 +22,8 @@
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
-Mapfiles and versioning in ON
-=============================
+Mapfiles and versioning in illumos
+==================================
1.0 Objective of this README
@@ -57,12 +57,11 @@ you must do as a shared library developer if you:
Mapfiles are used to tell the link-editor ("ld") all sorts of things about
how to generate an executable file or a shared object from a collection of
relocatable objects, such as generated by a compiler. For all the gory
-details, see the Solaris Linker and Libraries Guide, which can be found
-under http://docs.sun.com.
+details, see the Solaris Linker and Libraries Guide.
There are two versions of the mapfile language accepted by the link-editor.
Version 1 derives from AT&T System V Release 4 Unix. Version 2 is a newer
-syntax specific to Solaris. All mapfiles in the OSnet (ON consolidation) are
+syntax specific to Solaris and derivatives. All mapfiles in illumos are
required to use version 2 syntax. Note that every mapfile using version 2
syntax must start with the line:
@@ -100,6 +99,16 @@ for brevity):
$mapfile_version 2
+SYMBOL_VERSION ILLUMOS_0.2 { # Second interface change in illumos
+ global:
+ wb_notify;
+} ILLUMOS_0.1;
+
+SYMBOL_VERSION ILLUMOS_0.1 { # First interface change in illumos
+ global:
+ wb_poll;
+} SUNW_1.2;
+
SYMBOL_VERSION SUNW_1.2 { # update to libwombat, Solaris 10
global:
wb_readv;
@@ -122,34 +131,58 @@ SYMBOL_VERSION SUNWprivate { # private libwombat symbols
*;
};
-The SUNW_1.* names are the Public version names for the library.
-There should be at most one version name for each release of Solaris,
-with the minor number incremented by one over the previous version.
-
-If no update to the Public-visible names in the library is made
-in a given Solaris release, no new version name should be generated
-for that release. If multiple updates are made to the library at
-different points in the development of a given release of Solaris,
-only one version should be used for the entire release.
-
-So, for example, if an update to libwombat is made in Solaris 11,
-you would add "SUNW_1.3" at the start of the mapfile:
-
-SYMBOL_VERSION SUNW_1.3 { # update to libwombat, Solaris 11
+Each of these sections is a version declaration describing an ABI version of
+the library containing the set of symbols exposed by the library to
+external callers.
+
+ABI versions must be constant, that is version ILLUMOS_0.2 in a given
+library must always describe the same interface such that applications may
+safely state their dependencies in terms of these versions and have a
+constant and predictable ABI be exposed. This in effect means that once a
+version is publicly visible, it may never be removed or have symbols added
+to or removed from it.
+
+ABI versions with the same major number should be upward compatible, that is
+ILLUMOS_0.3 of a given library must contain all the interfaces in
+ILLUMOS_0.2, and they must be compatible.
+
+The private version, however, is special, and describes any private yet
+exposed symbols within a library, and may change at any time (and without
+notice). It exists purely to allow certain symbols to be of global scope
+but not Public. Similarly, any symbols scoped local are private and may
+change safely, even if the local statement happens to be within a public
+version.
+
+Interface changes made in illumos should be done with ILLUMOS_0.* versions,
+introducing one version per interface change. In illumos, unlike Solaris,
+symbol versions are not release-specific because of the requirement that
+each be constant. No change should be made to add or remove symbols from
+any pre-existing Public version.
+
+The SUNW_*.* names were the Public version names of the library in Solaris.
+There should be at most one version name for each release of Solaris, with
+the minor number incremented by one over the previous version. No changes
+should ever be made to SUNW_1.* versions.
+
+So, for example, to add a new interface to libwombat in illumos one would add:
+
+SYMBOL_VERSION ILLUMOS_0.3 { # Third update to libwombat in illumos
global:
wb_lseek;
-} SUNW_1.2;
+} ILLUMOS_0.2;
-Each version must inherit all symbols from its preceding version,
-specified at the ending "}" for each version. SUNW_1.1 does not
-inherit any symbols. SUNWprivate, if present, stands alone.
+Each version must inherit all symbols from its preceding version, specified at
+the ending "}" for each version. The initial public version does not inherit
+any symbols. The private version named either "SUNWprivate" for libraries
+with private symbols pre-existing illumos, or "ILLUMOSprivate" otherwise
+stands alone, inheriting nothing and being inherited by nothing.
The two lines in SUNWprivate:
local:
*;
-ensure that no symbols other than those listed in the mapfile are
-visible to clients of the library. If there is no SUNWprivate,
-these two lines should appear in SUNW_1.1.
+ensure that no symbols other than those listed in the mapfile are visible to
+clients of the library. If there is no private version, these two lines should
+appear in the first public version.
For maintainability, the list of names in each version block should
be sorted in dictionary order (sort -d). Please comply.
@@ -173,7 +206,8 @@ Conditional input can be used if there are ISA-specific library interfaces
not common to all instances of the library. It is the preferred method for
expressing platform specific items, as long as the differences are simple
(which is almost always the case). For example, see libproc, or, if you
-are masochistic, libc or libnsl.
+are masochistic, libc or libnsl. In general, use of this feature should be
+minimal.
In addition to conditional input, there is a second heavier weight mechanism
for expressing ISA-specific differences. In addition to the common mapfile:
@@ -202,68 +236,74 @@ carefully, or the resulting mapfile can be extremly difficult to read.
4.1 Adding a Public interface
-The first engineer to update the existing mapfile-vers file in a release needs
-to identify the current highest version name and properly increment the minor
-version number by 1 to be the new version name. If this is the first Public
-interface in the shared object, a new SUNW_1.1 version name must be introduced.
+Public interfaces should be added to a new ILLUMOS_ symbol version, with the
+minor number incremented by one from the current highest version name. If
+this is the first Public interface in the shared object, a new ILLUMOS_0.1
+version name must be introduced.
The major revision number is incremented whenever an incompatible change is
-made to an interface. This could be the case if an API changes so dramatically
-as to invalidate dependencies. This rarely occurs in practice. It also
-requires changing the suffix of the shared object from, say, .so.1 to .so.2
-and introducing code to continue to ship the .so.1 version of the library.
+made to an interface. This could be the case if an API changes so
+dramatically as to invalidate dependencies. This should almost never occur
+in practice. It also requires changing the suffix of the shared object
+from, say, .so.1 to .so.2 and introducing code to continue to ship the .so.1
+version of the library.
The minor revision number is incremented whenever one or more new interfaces
-is added to a library. Note that the minor number is not incremented on every
-putback that makes an interface addition to the library. Rather, it is
-incremented at most once per (external to Sun) release of the library.
+is added to a library. Once a version comes to exist in illumos, it is from
+that point onward considered to be immutable.
4.2 Adding a Private interface
Private interfaces are the non-ABI interfaces of the library. Unlike
introducing a Public interface, a new entry is simply added to the
-SUNWprivate version. No minor number increment is necessary.
-
-If this interface happens to be the first Private interface introduced
-into the library, the SUNWprivate version must be created (no major.minor
-version numbers). It inherits nothing and nothing inherits from it.
-
-If the library already has Private interfaces, they may have numbered version
-names like SUNWprivate_m.n (due to errors of the past). If so, just use the
-highest numbered private version name to version the new interface. There
-is no need to introduce a new private version name. Be careful not to use
-a lower numbered private version name; doing so can cause runtime errors
-(as opposed to load time errors) when running an application with older
-versions of the library.
-
-There are libraries in the OSnet consolidation that contain only private
-interfaces. In such libraries, the SUNWprivate_m.n may be incremented
-to ensure that the programs that depend on them are built and delivered as a
-integrated unit. A notable example of this is libld.so (usr/src/cmd/sgs/libld),
-which contains the implementation of the link-editor, the public interface to
-which is provided by the ld command. When making a modification to the interface
-of such a library, you should follow the convention already in place.
-
-4.3 Adding new public interfaces in an update release
-
-Adding new public interfaces in an update release requires careful
-coordination with the next marketing release currently under development.
-Multiple updates ship during the period before the next marketing release
-ships, and since it is generally impossible to know the full set of new
-interfaces in the next marketing release until late in its development
-(after multiple updates have shipped) it must be assumed that not all
-interfaces added to the next marketing release will be added to an update.
+private version. No minor number increment is necessary.
+
+If this interface happens to be the first Private interface introduced into
+the library, the private version must be created (with no major.minor
+version numbers). It inherits nothing, nothing inherits from it and it
+should be named ILLUMOSprivate.
+
+If the library already has Private interfaces in a SUNWprivate version, you
+should use that. They may have numbered version names like SUNWprivate_m.n
+(due to errors of the past). If so, just use the highest numbered private
+version name to version the new interface. There is no need to introduce a
+new private version name. Be careful not to use a lower numbered private
+version name; doing so can cause runtime errors (as opposed to load time
+errors) when running an application with older versions of the library.
+
+There are also libraries in illumos that contain only private interfaces. In
+such libraries, the private versions maybe legitimately be versioned and
+they may be incremented to ensure that the programs that depend on them are
+built and delivered as a integrated unit. A notable example of this is
+libld.so (usr/src/cmd/sgs/libld), which contains the implementation of the
+link-editor, the public interface to which is provided by the ld
+command. When making a modification to the interface of such a library, you
+should follow the convention already in place.
+
+4.3 Historical handling of Solaris update releases.
+
+To aid the understanding of our existing mapfiles, it is useful to note how
+interface versions were handled as they interacted with update releases of
+Solaris. Solaris update releases required careful coordination with the full
+release currently under development to keep symbol versions constant between
+releases.
+
+Multiple update releases were generally shipped during the development of the
+next full release of Solaris. It was impossible to know in advance the full
+set of new interfaces in the next full release until it was complete. Some,
+though not all, new interfaces were included in the intervening update
+releases between full releases.
Consequently, the new version number for an update cannot be a minor
-increment, but must be a micro increment. For example, if Release N
-has version number SUNW_1.3 and Release N+1 will have SUNW_1.4, then
-interfaces added to an update of Release N must have micro numbers such
-as SUNW_1.3.1, SUNW_1.3.2, etc. (note that the micro number is not
-directly tied to the update number: SUNW_1.3.1 may appear in Update 2).
-The micro versions form an inheritance chain that is inserted between
-two successive minor versions. For example, the mapfile-vers file for
-minor release "N+1" to reflect its inclusion of micro releases will
-look like the following:
+increment, but must be a micro increment to ensure that was a distinct
+version between the two releases. For example, if Release N had version
+number SUNW_1.3 and Release N+1 had SUNW_1.4, then interfaces added to
+an update of Release N must have micro numbers such as SUNW_1.3.1,
+SUNW_1.3.2, etc. (note that the micro number is not directly tied to the
+update number: SUNW_1.3.1 may have appeared in Update 2). The micro versions form
+an inheritance chain that is inserted between two successive minor versions.
+For example, the mapfile-vers file for minor release "N+1" to reflect its
+inclusion of micro releases will look like the following:
$mapfile_version 2
@@ -310,12 +350,12 @@ except for the exclusion of SUNW_1.4.
Those interfaces which are only present in Release N+1 are always put
into the next minor version set, SUNW_1.4.
-Thus when adding a new public interface to an update, both the mapfiles
-of the update release and next marketing release must be modified to be
-consistent. The update versions should not be added to the marketing
-release until the putback to the update release has occurred, to avoid
-timing problems with the update releases (it's all too easy for projects
-to slip out of updates, or to change ordering).
+Thus when adding a new Public interface to an update release, both the mapfiles
+of the update release and next full release should have been modified to be
+consistent.
+
+There have been several cases of accidental deviation from this scheme, and
+existing mapfiles sometimes reflect this unfortunate state of affairs.
-------------------------------------------------------------------------------
@@ -325,7 +365,8 @@ to slip out of updates, or to change ordering).
5.1.1 Moving a Public interface
-No Public interfaces should ever be removed from any mapfile.
+No Public interfaces should ever be removed from any mapfile, as this will
+break all existing consumers of that interface.
To move an interface from one library to (say) libc, the code has to be
deleted from the library and added to libc, then the mapfile for the
@@ -333,21 +374,29 @@ library has to have the interface's entry changed from:
getfoobar;
to:
getfoobar { TYPE = FUNCTION; FILTER = libc.so.1 };
-See, for example, libnsl's common/mapfile-vers file.
+This is an exception to the immutability of public symbol versions. See,
+for example, libnsl's common/mapfile-vers file.
Follow the rules for adding a new interface for the necessary changes
-to libc's mapfile to accommodate the moved interface. In particular,
-the new interface must be added to the current highest libc version.
+to libc's mapfile to accommodate the moved interface, including creating a
+new version in libc for the symbol.
-To move an entire library into libc, look at what has already been done
-for libthread, libaio, and librt.
+When merging an entire library into libc, the mapfile is changed to specify
+the type of each public symbol similarly to the above:
+ getfoobar;
+to:
+ getfoobar { TYPE = FUNCTION };
+
+But rather than specifying the library on which we filter for each symbol,
+the link-editor is invoked with '-F libc.so.1' to specify that our entire
+symbol table is a filter on libc. For examples, see libaio and librt.
5.1.2 Removing a Private interface
Deletion of Private interfaces is allowed, but caution should be taken;
it should first be established that the interface is not being used.
To remove a Private interface, simply delete the corresponding entry
-for that symbol from the mapfile's SUNWprivate section.
+for that symbol from the mapfile's private version section.
Do not forget to delete these Public or Private interfaces from the library's
header files as well as from the code that implements the interfaces.
@@ -356,17 +405,18 @@ header files as well as from the code that implements the interfaces.
This is similar to what's done when adding a Public interface. Promoting an
existing Private interface to a Public one only requires a change to the
-existing interface definition. Private interfaces have the symbol version name
-"SUNWprivate" associated with them. To make the interface a Public one, the
-interface must be put into a set associated with the current Public release
-level of the library.
-
-As an example, if we were modifying libwombat.so.1 and its version in the
-last release of Solaris was SUNW_1.23, any new ABI introduced in the next
-release would be put into a version called SUNW_1.24. Therefore, whether
-you wish to promote an existing Private interface to Public, or to introduce
-a new Public interface, this (next successive minor numbered version level)
-would be the version that it would be associated with.
+existing interface definition. Private interfaces have the symbol version
+name "ILLUMOSprivate" or "SUNWprivate" associated with them. To make the
+interface a Public one, the interface must be added as if it were a new
+public symbol, following those same rules and removed from the private
+version.
+
+As an example, if we were modifying libwombat.so.1 and its existing latest
+version were ILLUMOS_0.3, any new ABI would be put into a version called
+ILLUMOS_0.4. Therefore, whether you wish to promote an existing Private
+interface to Public, or to introduce a new Public interface, this (next
+successive minor numbered version level) would be the version that it would
+be associated with.
5.3 Scoping a Private interface local
@@ -379,7 +429,7 @@ outside the library. To move an interface from Private to local scope, simply
remove the Private interface from the mapfile-vers file and the header file
to prevent it from being exported. This may require moving the Private
interface into a library-private header file. Scope reduction of Public
-interfaces is not allowed without specific ARC review and approval.
+interfaces is forbidden.
For the interface to be used in more than one file within the library, it
should be in a header file that can be included by each file in the library
@@ -393,10 +443,10 @@ that uses the interface. For example:
SYSVABI and SISCD are reserved version names for interfaces listed in the
System V Interface Definition and the Sparc Compliance Definition. Avoid using
these version names when copying the implementation of standard interfaces to
-another library. Instead, use SUNW_1.1 for a new library, and SUNW_m.n for
-an existing library (where m.n is the next release version; i.e., if the
-last version was SUNW_1.18, then you should version the interfaces with
-SUNW_1.19).
+another library. Instead, use ILLUMOS_0.1 for a new library, and ILLUMOS_m.n for
+an existing library (where m.n is the next version; i.e., if the
+last version was ILLUMOS_0.8, then you should version the interfaces with
+ILLUMOS_0.9).
-------------------------------------------------------------------------------
@@ -404,10 +454,10 @@ SUNW_1.19).
6.1 Directories
-The normal discipline for introducing a new library in OS/Net is to create a
-new subdirectory of /usr/src/lib. The interface definition discipline is to
+The normal discipline for introducing a new library in illumos is to create a
+new subdirectory of usr/src/lib. The interface definition discipline is to
create a common/mapfile-vers file for the new library. If we were introducing
-a new foo library, libfoo, we'd create /usr/src/lib/libfoo containing:
+a new foo library, libfoo, we'd create usr/src/lib/libfoo containing:
Makefile amd64/ i386/ sparcv9/
Makefile.com common/ sparc/
The common subdirectory would contain the normal source files plus the
@@ -420,31 +470,29 @@ The new common/mapfile-vers file would contain:
$mapfile_version 2
-SYMBOL_VERSION SUNW_1.1 { # first release of libfoo
+SYMBOL_VERSION ILLUMOS_0.1 { # first release of libfoo
global:
...
};
-SYMBOL_VERSION SUNWprivate {
+SYMBOL_VERSION ILLUMOSprivate {
global:
...
local:
*;
};
-If there are no Public interfaces, the SUNW_1.1 section would be omitted.
-If there are no Private interfaces, the SUNWprivate section would be
+If there are no Public interfaces, the ILLUMOS_0.1 section would be omitted.
+If there are no Private interfaces, the ILLUMOSprivate section would be
omitted and the two lines:
local:
*;
would be moved into SUNW_1.1
-To decide which interfaces are Public (part of the ABI) and which are Private
-(unstable interfaces not intended to be used by third party applications or
-unbundled products), the heuristic which works to a first approximation is
-that if it has a man page then it's Public. Also, it is really the ARC case
-for the new interfaces that prescribes which interfaces are Public and
-which are not (hence, which interfaces have man pages and which do not).
+To decide which interfaces are Public (part of the ABI) and which are
+Private (unstable interfaces not intended to be used by third parties), the
+heuristic which works to a first approximation is that if it has a man page
+then it's Public.
For maintainability, the list of names in each version block should
be sorted in dictionary order (sort -d). Please comply.
@@ -468,20 +516,15 @@ SYMBOL_VERSION SUNWobsolete {
SUNWobsolete; # This is the only way to do it.
} SUNW_1.2;
-SYMBOL_VERSION SUNW_1.2 {
+SYMBOL_VERSION ILLUMOS_0.2 {
...
+You should continue to use the name SUNWobsolete even in illumos.
+
-------------------------------------------------------------------------------
8.0 Documentation
For further information, please refer to the following documents:
- "Solaris Linker and Libraries Guide", http://docs.sun.com
- /shared/ON/general_docs/scoping-rules.fm.ps
-
-For information on the now-obsolete spec files, used in Solaris releases
-7 through 10, see:
- /shared/ON/general_docs/README.spec
- /shared/ON/general_docs/libspec-rules.ps
- /shared/ON/general_docs/spectrans/*
+ "Solaris Linker and Libraries Guide"
diff --git a/usr/src/lib/abi/apptrace/Makefile.com b/usr/src/lib/abi/apptrace/Makefile.com
index 578ccf83eb..224209a71d 100644
--- a/usr/src/lib/abi/apptrace/Makefile.com
+++ b/usr/src/lib/abi/apptrace/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = apptrace.a
VERS = .1
@@ -34,6 +32,8 @@ include ../../Makefile.abi
LIBS = $(DYNLIB)
CPPFLAGS = -I. $(CPPFLAGS.master)
+CERRWARN += -_gcc=-Wno-uninitialized
+
# No mapfile here
MAPFILES =
diff --git a/usr/src/lib/auditd_plugins/binfile/Makefile.com b/usr/src/lib/auditd_plugins/binfile/Makefile.com
index 96185b4af1..f3f74d02b1 100644
--- a/usr/src/lib/auditd_plugins/binfile/Makefile.com
+++ b/usr/src/lib/auditd_plugins/binfile/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= audit_binfile.a
VERS= .1
@@ -40,6 +38,8 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(LIBBSM)
CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+CERRWARN += -_gcc=-Wno-parentheses
+
ROOTLIBDIR= $(ROOT)/usr/lib/security
.KEEP_STATE:
diff --git a/usr/src/lib/auditd_plugins/syslog/Makefile.com b/usr/src/lib/auditd_plugins/syslog/Makefile.com
index 40ecbc25bd..0e1c95eed9 100644
--- a/usr/src/lib/auditd_plugins/syslog/Makefile.com
+++ b/usr/src/lib/auditd_plugins/syslog/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= audit_syslog.a
VERS= .1
@@ -49,6 +47,9 @@ CPPFLAGS += -D_REENTRANT
CPPFLAGS += -I$(PRAUDIT)
CPPFLAGS += -I$(LIBBSM)
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+
ROOTLIBDIR= $(ROOT)/usr/lib/security
.KEEP_STATE:
diff --git a/usr/src/lib/brand/solaris10/s10_brand/Makefile.com b/usr/src/lib/brand/solaris10/s10_brand/Makefile.com
index f031d769f0..022b31b4e7 100644
--- a/usr/src/lib/brand/solaris10/s10_brand/Makefile.com
+++ b/usr/src/lib/brand/solaris10/s10_brand/Makefile.com
@@ -83,6 +83,8 @@ DYNFLAGS += $(DYNFLAGS_$(CLASS))
DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
LDLIBS += -lc -lmapmalloc
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(LIBS):= PICS += $(SHAREDOBJS)
.KEEP_STATE:
diff --git a/usr/src/lib/cfgadm_plugins/fp/Makefile.com b/usr/src/lib/cfgadm_plugins/fp/Makefile.com
index b9786290f9..c18d3323d3 100644
--- a/usr/src/lib/cfgadm_plugins/fp/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/fp/Makefile.com
@@ -45,6 +45,12 @@ LINTFLAGS64 += -DDEBUG
CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-address
+
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
LINTFLAGS += -erroff=E_SEC_SPRINTF_UNBOUNDED_COPY
diff --git a/usr/src/lib/cfgadm_plugins/fp/common/cfga_utils.c b/usr/src/lib/cfgadm_plugins/fp/common/cfga_utils.c
index 0ab98b77f5..9f1cee82b8 100644
--- a/usr/src/lib/cfgadm_plugins/fp/common/cfga_utils.c
+++ b/usr/src/lib/cfgadm_plugins/fp/common/cfga_utils.c
@@ -137,7 +137,7 @@ msgcvt_t str_tbl[] = {
{ERR_MATCHING_HBA_PORT, 0, 1,
"No match HBA port found"},
{ERR_NO_ADAPTER_FOUND, 0, 1,
- "No Fibre Channel adpaters found"},
+ "No Fibre Channel adapters found"},
/* Errors with arguments */
{ERRARG_OPT_INVAL, 1, 1, "invalid option: "},
@@ -442,7 +442,7 @@ apidt_create(const char *ap_id, apid_t *apidp, char **errstring)
/* Get the path of dynamic attachment point if already configured. */
if (dyncomp != NULL) {
ret = dyn_apid_to_path(xport_phys, dyncomp,
- &lunlistp, &l_errno);
+ &lunlistp, &l_errno);
if ((ret != FPCFGA_OK) && (ret != FPCFGA_APID_NOCONFIGURE)) {
cfga_err(errstring, l_errno, ERR_OP_FAILED, 0);
goto err;
@@ -564,7 +564,7 @@ walk_tree(
while (fpnode) {
devfs_fp_path = di_devfs_path(fpnode);
if ((devfs_fp_path) && !(strncmp(devfs_fp_path,
- root_path, strlen(root_path)))) {
+ root_path, strlen(root_path)))) {
found = 1;
di_devfs_path_free(devfs_fp_path);
break;
@@ -587,7 +587,7 @@ walk_tree(
} else {
assert(cmd == FPCFGA_WALK_MINOR);
rv = di_walk_minor(root, up->walkmode.minor_args.nodetype, 0,
- arg, up->walkmode.minor_args.fcn);
+ arg, up->walkmode.minor_args.fcn);
}
if (rv != 0) {
@@ -671,7 +671,7 @@ cfga_err(char **errstring, int l_errno, ...)
* So, concatenate the old and new strings
*/
if ((tmp_str = calloc(1,
- strlen(*errstring) + strlen(tmp_err_str) + 2)) == NULL) {
+ strlen(*errstring) + strlen(tmp_err_str) + 2)) == NULL) {
/* In case of error, retain only the earlier message */
free(tmp_err_str);
return;
@@ -928,7 +928,7 @@ known_state(di_node_t node)
* offline.
*/
if ((state & DI_DEVICE_OFFLINE) == DI_DEVICE_OFFLINE ||
- (state & DI_DRIVER_DETACHED) != DI_DRIVER_DETACHED) {
+ (state & DI_DRIVER_DETACHED) != DI_DRIVER_DETACHED) {
return (1);
}
@@ -1118,8 +1118,8 @@ getAdapterAttrs(HBA_HANDLE handle, HBA_ADAPTERATTRIBUTES *attrs)
/* Loop as long as we have a retryable error */
while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
- status == HBA_STATUS_ERROR_BUSY) &&
- count++ < HBA_MAX_RETRIES) {
+ status == HBA_STATUS_ERROR_BUSY) &&
+ count++ < HBA_MAX_RETRIES) {
status = HBA_GetAdapterAttributes(handle, attrs);
if (status == HBA_STATUS_OK) {
break;
@@ -1141,11 +1141,11 @@ getPortAttrsByWWN(HBA_HANDLE handle, HBA_WWN wwn, HBA_PORTATTRIBUTES *attrs)
/* Loop as long as we have a retryable error */
while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
- status == HBA_STATUS_ERROR_BUSY) &&
- count++ < HBA_MAX_RETRIES) {
+ status == HBA_STATUS_ERROR_BUSY) &&
+ count++ < HBA_MAX_RETRIES) {
status = HBA_GetPortAttributesByWWN(handle, wwn, attrs);
if (status == HBA_STATUS_OK) {
- break;
+ break;
}
/* The odds of this occuring are very slim, but possible. */
@@ -1175,8 +1175,8 @@ getAdapterPortAttrs(HBA_HANDLE handle, int portIndex,
/* Loop as long as we have a retryable error */
while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
- status == HBA_STATUS_ERROR_BUSY) &&
- count++ < HBA_MAX_RETRIES) {
+ status == HBA_STATUS_ERROR_BUSY) &&
+ count++ < HBA_MAX_RETRIES) {
status = HBA_GetAdapterPortAttributes(handle, portIndex, attrs);
if (status == HBA_STATUS_OK) {
break;
@@ -1209,10 +1209,10 @@ getDiscPortAttrs(HBA_HANDLE handle, int portIndex, int discIndex,
/* Loop as long as we have a retryable error */
while ((status == HBA_STATUS_ERROR_TRY_AGAIN ||
- status == HBA_STATUS_ERROR_BUSY) &&
- count++ < HBA_MAX_RETRIES) {
+ status == HBA_STATUS_ERROR_BUSY) &&
+ count++ < HBA_MAX_RETRIES) {
status = HBA_GetDiscoveredPortAttributes(handle, portIndex,
- discIndex, attrs);
+ discIndex, attrs);
if (status == HBA_STATUS_OK) {
break;
}
@@ -1253,119 +1253,135 @@ findMatchingAdapterPort(char *portPath, HBA_HANDLE *matchingHandle,
status = HBA_LoadLibrary();
if (status != HBA_STATUS_OK) {
- cfga_err(errstring, 0, ERR_HBA_LOAD_LIBRARY, 0);
- return (FPCFGA_LIB_ERR);
+ cfga_err(errstring, 0, ERR_HBA_LOAD_LIBRARY, 0);
+ return (FPCFGA_LIB_ERR);
}
count = HBA_GetNumberOfAdapters();
if (count == 0) {
- cfga_err(errstring, 0, ERR_NO_ADAPTER_FOUND, 0);
- HBA_FreeLibrary();
- return (FPCFGA_LIB_ERR);
+ cfga_err(errstring, 0, ERR_NO_ADAPTER_FOUND, 0);
+ HBA_FreeLibrary();
+ return (FPCFGA_LIB_ERR);
}
/* Loop over all HBAs */
for (adapterIndex = 0; adapterIndex < count; adapterIndex ++) {
- status = HBA_GetAdapterName(adapterIndex, (char *)&adapterName);
- if (status != HBA_STATUS_OK) {
- /* May have been DR'd */
- continue;
- }
- handle = HBA_OpenAdapter(adapterName);
- if (handle == 0) {
- /* May have been DR'd */
- continue;
- }
-
- do {
- if (getAdapterAttrs(handle, &hbaAttrs)) {
- /* Should never happen */
- HBA_CloseAdapter(handle);
- continue;
+ status = HBA_GetAdapterName(adapterIndex, (char *)&adapterName);
+ if (status != HBA_STATUS_OK) {
+ /* May have been DR'd */
+ continue;
+ }
+ handle = HBA_OpenAdapter(adapterName);
+ if (handle == 0) {
+ /* May have been DR'd */
+ continue;
}
- /* Loop over all HBA Ports */
- for (portIndex = 0;
- portIndex < hbaAttrs.NumberOfPorts; portIndex++) {
- if ((status = getAdapterPortAttrs(handle, portIndex,
- &portAttrs)) != HBA_STATUS_OK) {
- /* Need to refresh adapter */
- if (status == HBA_STATUS_ERROR_STALE_DATA) {
- HBA_RefreshInformation(handle);
- break;
- } else {
- continue;
+ do {
+ if (getAdapterAttrs(handle, &hbaAttrs)) {
+ /* Should never happen */
+ HBA_CloseAdapter(handle);
+ continue;
}
- }
- /*
- * check to see if OSDeviceName is a /dev/cfg link
- * or the physical path
- */
- if (strncmp(portAttrs.OSDeviceName, CFGA_DEV_DIR,
- strlen(CFGA_DEV_DIR)) != 0) {
- tmpPtr = strstr(portAttrs.OSDeviceName, MINOR_SEP);
- if (tmpPtr != NULL) {
- if (strncmp(portPath,
+ /* Loop over all HBA Ports */
+ for (portIndex = 0;
+ portIndex < hbaAttrs.NumberOfPorts; portIndex++) {
+ if ((status = getAdapterPortAttrs(handle,
+ portIndex,
+ &portAttrs)) != HBA_STATUS_OK) {
+ /* Need to refresh adapter */
+ if (status ==
+ HBA_STATUS_ERROR_STALE_DATA) {
+ HBA_RefreshInformation(handle);
+ break;
+ } else {
+ continue;
+ }
+ }
+
+ /*
+ * check to see if OSDeviceName is a /dev/cfg
+ * link or the physical path
+ */
+ if (strncmp(portAttrs.OSDeviceName,
+ CFGA_DEV_DIR,
+ strlen(CFGA_DEV_DIR)) != 0) {
+ tmpPtr = strstr(portAttrs.OSDeviceName,
+ MINOR_SEP);
+ if ((tmpPtr != NULL) &&
+ strncmp(portPath,
portAttrs.OSDeviceName,
strlen(portAttrs.OSDeviceName) -
strlen(tmpPtr)) == 0) {
- if (matchingHandle)
- *matchingHandle = handle;
- if (matchingPortIndex)
- *matchingPortIndex = portIndex;
- if (matchingPortAttrs)
- *matchingPortAttrs = portAttrs;
- return (FPCFGA_OK);
- }
- }
- } else {
- /*
- * strip off the /dev/cfg/ portion of the
- * OSDeviceName
- * make sure that the OSDeviceName is at least
- * strlen("/dev/cfg") + 1 + 1 long.
- * first 1 is for the / after /dev/cfg
- * second 1 is to make sure there is somthing
- * after
- */
- if (strlen(portAttrs.OSDeviceName) <
- (strlen(CFGA_DEV_DIR) + 1 + 1))
- continue;
- cfg_ptr = portAttrs.OSDeviceName +
- strlen(CFGA_DEV_DIR) + 1;
- if (logical_apid == NULL) {
- /* get the /dev/cfg link from the portPath */
- if (make_xport_logid(portPath, &logical_apid,
- &l_errno) != FPCFGA_OK) {
- cfga_err(errstring, l_errno,
- ERR_LIST, 0);
- HBA_FreeLibrary();
- return (FPCFGA_LIB_ERR);
+ if (matchingHandle)
+ *matchingHandle =
+ handle;
+ if (matchingPortIndex)
+ *matchingPortIndex =
+ portIndex;
+ if (matchingPortAttrs)
+ *matchingPortAttrs =
+ portAttrs;
+ return (FPCFGA_OK);
+ }
+ } else {
+ /*
+ * strip off the /dev/cfg/ portion of
+ * the OSDeviceName make sure that the
+ * OSDeviceName is at least
+ * strlen("/dev/cfg") + 1 + 1 long.
+ * first 1 is for the / after /dev/cfg
+ * second 1 is to make sure there is
+ * somthing after
+ */
+ if (strlen(portAttrs.OSDeviceName) <
+ (strlen(CFGA_DEV_DIR) + 1 + 1))
+ continue;
+ cfg_ptr = portAttrs.OSDeviceName +
+ strlen(CFGA_DEV_DIR) + 1;
+ if (logical_apid == NULL) {
+ /*
+ * get the /dev/cfg link from
+ * the portPath
+ */
+ if (make_xport_logid(portPath,
+ &logical_apid,
+ &l_errno) != FPCFGA_OK) {
+ cfga_err(errstring,
+ l_errno,
+ ERR_LIST, 0);
+ HBA_FreeLibrary();
+ return
+ (FPCFGA_LIB_ERR);
+ }
+ }
+ /* compare logical ap_id */
+ if (strcmp(logical_apid,
+ cfg_ptr) == 0) {
+ if (matchingHandle)
+ *matchingHandle =
+ handle;
+ if (matchingPortIndex)
+ *matchingPortIndex =
+ portIndex;
+ if (matchingPortAttrs)
+ *matchingPortAttrs =
+ portAttrs;
+ S_FREE(logical_apid);
+ return (FPCFGA_OK);
+ }
}
}
- /* compare logical ap_id */
- if (strcmp(logical_apid, cfg_ptr) == 0) {
- if (matchingHandle)
- *matchingHandle = handle;
- if (matchingPortIndex)
- *matchingPortIndex = portIndex;
- if (matchingPortAttrs)
- *matchingPortAttrs = portAttrs;
+ if (logical_apid != NULL)
S_FREE(logical_apid);
- return (FPCFGA_OK);
- }
- }
- }
- if (logical_apid != NULL)
- S_FREE(logical_apid);
- } while ((status == HBA_STATUS_ERROR_STALE_DATA) &&
- (retry++ < HBA_MAX_RETRIES));
+ } while ((status == HBA_STATUS_ERROR_STALE_DATA) &&
+ (retry++ < HBA_MAX_RETRIES));
- HBA_CloseAdapter(handle);
+ HBA_CloseAdapter(handle);
}
free(logical_apid);
- /* Got here. No mathcing adatper port found. */
+ /* Got here. No matching adapter port found. */
cfga_err(errstring, 0, ERR_MATCHING_HBA_PORT, 0);
HBA_FreeLibrary();
return (FPCFGA_LIB_ERR);
diff --git a/usr/src/lib/cfgadm_plugins/ib/Makefile.com b/usr/src/lib/cfgadm_plugins/ib/Makefile.com
index 659d07eaa7..185009afea 100644
--- a/usr/src/lib/cfgadm_plugins/ib/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/ib/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= ib.a
VERS= .1
@@ -45,6 +43,11 @@ LINTFLAGS64 += -DDEBUG
CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
+
LDLIBS += -lc -ldevice -ldevinfo -lrcm -lnvpair
.KEEP_STATE:
diff --git a/usr/src/lib/cfgadm_plugins/pci/Makefile.com b/usr/src/lib/cfgadm_plugins/pci/Makefile.com
index 58aad22226..b53cad13f7 100644
--- a/usr/src/lib/cfgadm_plugins/pci/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/pci/Makefile.com
@@ -47,6 +47,10 @@ CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
CFLAGS += $(CCVERBOSE)
LDLIBS += -lc -ldevice -ldevinfo -lrcm
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/cfgadm_plugins/sata/Makefile.com b/usr/src/lib/cfgadm_plugins/sata/Makefile.com
index 6b10ca7b3f..1526413a4e 100644
--- a/usr/src/lib/cfgadm_plugins/sata/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/sata/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= sata.a
VERS= .1
@@ -45,6 +43,10 @@ LINTFLAGS64 += -DDEBUG
CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+
LDLIBS += -lc -ldevice -ldevinfo -lrcm -lnvpair
.KEEP_STATE:
diff --git a/usr/src/lib/cfgadm_plugins/sbd/Makefile.com b/usr/src/lib/cfgadm_plugins/sbd/Makefile.com
index e28db75c53..b3d7040f9c 100644
--- a/usr/src/lib/cfgadm_plugins/sbd/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/sbd/Makefile.com
@@ -47,6 +47,10 @@ LIBS = $(DYNLIB)
CFLAGS += $(CCVERBOSE)
LDLIBS += -lc -lkstat -lnvpair
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+
CPPFLAGS += -I$(ROOT)/usr/platform/$(PLATFORM)/include -DSBD_DEBUG
#
# Generate the error messages form sbd_ioctl.h
diff --git a/usr/src/lib/cfgadm_plugins/scsi/Makefile.com b/usr/src/lib/cfgadm_plugins/scsi/Makefile.com
index c29b5bc91d..effff0131e 100644
--- a/usr/src/lib/cfgadm_plugins/scsi/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/scsi/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= scsi.a
VERS= .1
@@ -40,6 +38,10 @@ ROOTLIBDIR64= $(ROOTLIBDIR)/$(MACH64)
LIBS= $(DYNLIB)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-address
LDLIBS += -lc -ldevice -ldevinfo -lrcm
diff --git a/usr/src/lib/cfgadm_plugins/scsi/SUNW,SPARC-Enterprise/Makefile.com b/usr/src/lib/cfgadm_plugins/scsi/SUNW,SPARC-Enterprise/Makefile.com
index e675ae9d87..e099697a93 100644
--- a/usr/src/lib/cfgadm_plugins/scsi/SUNW,SPARC-Enterprise/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/scsi/SUNW,SPARC-Enterprise/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= scsi.a
VERS= .1
@@ -51,6 +49,10 @@ SRCS= $(GEN_OBJECTS:%.o=../../common/%.c) $(OPL_OBJECTS:%.o=../common/%.c)
LIBS= $(DYNLIB)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-address
+CERRWARN += -_gcc=-Wno-char-subscripts
LDLIBS += -lc -ldevice -ldevinfo -lrcm
diff --git a/usr/src/lib/cfgadm_plugins/shp/Makefile.com b/usr/src/lib/cfgadm_plugins/shp/Makefile.com
index 2d86582b4e..3ba1ae337c 100644
--- a/usr/src/lib/cfgadm_plugins/shp/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/shp/Makefile.com
@@ -47,6 +47,11 @@ CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
CFLAGS += $(CCVERBOSE)
LDLIBS += -lc -ldevinfo -lhotplug
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/cfgadm_plugins/sysctrl/Makefile.com b/usr/src/lib/cfgadm_plugins/sysctrl/Makefile.com
index 97074136e6..786b37df3f 100644
--- a/usr/src/lib/cfgadm_plugins/sysctrl/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/sysctrl/Makefile.com
@@ -52,6 +52,10 @@ LDLIBS += -lc
CPPFLAGS += -I$(ROOT)/usr/platform/$(PLATFORM)/include
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/cfgadm_plugins/usb/Makefile.com b/usr/src/lib/cfgadm_plugins/usb/Makefile.com
index bd2941c04c..9588313161 100644
--- a/usr/src/lib/cfgadm_plugins/usb/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/usb/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= usb.a
VERS= .1
@@ -45,6 +43,11 @@ LINTFLAGS64 += -DDEBUG
CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
+
LDLIBS += -lc -ldevice -ldevinfo -lrcm -lnvpair
.KEEP_STATE:
diff --git a/usr/src/lib/efcode/Makefile.efcode b/usr/src/lib/efcode/Makefile.efcode
index b8c1e73b3d..b88f04d40a 100644
--- a/usr/src/lib/efcode/Makefile.efcode
+++ b/usr/src/lib/efcode/Makefile.efcode
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
#
# Common build rules for efcode shared objects.
@@ -48,6 +46,13 @@ CPPFLAGS += -DDEBUG -DFCODE_INTERNAL
CPPFLAGS += -I $(SRC)/lib/efcode/include -I $(ROOT)/usr/platform/sun4u/include
DYNFLAGS += -R\$$ORIGIN
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-type-limits
+
EFCODE64DIR = /usr/lib/efcode/$(MACH64)
ROOTLIBDIR = $(ROOT)/usr/lib/efcode
ROOTLIBDIR64 = $(ROOT)/usr/lib/efcode/$(MACH64)
diff --git a/usr/src/lib/efcode/efdaemon/Makefile b/usr/src/lib/efcode/efdaemon/Makefile
index e4e90c5633..c6343f8413 100644
--- a/usr/src/lib/efcode/efdaemon/Makefile
+++ b/usr/src/lib/efcode/efdaemon/Makefile
@@ -33,6 +33,8 @@ EFCODEDIR64 = $(EFCODEDIR)/$(MACH64)
CPPFLAGS += -DDEBUG -DFCODE_INTERNAL
CPPFLAGS += -I ../include -I $(ROOT)/usr/platform/sun4u/include
+CERRWARN += -_gcc=-Wno-unused-variable
+
PROG = efdaemon
EFTARGETS += $(EFCODEDIR64)/$(PROG)
EFTARGETS += $(EFCODEDIR)/efcode.sh
diff --git a/usr/src/lib/efcode/interpreter/Makefile b/usr/src/lib/efcode/interpreter/Makefile
index 020ab170bb..d7475b45bb 100644
--- a/usr/src/lib/efcode/interpreter/Makefile
+++ b/usr/src/lib/efcode/interpreter/Makefile
@@ -23,8 +23,6 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include $(SRC)/cmd/Makefile.cmd
include $(SRC)/cmd/Makefile.cmd.64
@@ -36,6 +34,8 @@ ROOTCMDDIR = $(EFCODEDIR64)
CPPFLAGS += -DDEBUG -DFCODE_INTERNAL
CPPFLAGS += -I ../include -I $(ROOT)/usr/platform/sun4u/include
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
LDFLAGS += -R/usr/lib/efcode/$(MACH64) -M mapfile64
LIBS = fcode.so fcdriver.so
diff --git a/usr/src/lib/fm/libfmd_adm/Makefile.com b/usr/src/lib/fm/libfmd_adm/Makefile.com
index 51a480a2bd..8e58527bef 100644
--- a/usr/src/lib/fm/libfmd_adm/Makefile.com
+++ b/usr/src/lib/fm/libfmd_adm/Makefile.com
@@ -41,6 +41,7 @@ SRCDIR = ../common
CPPFLAGS += -I../common -I.
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CERRWARN += -_gcc=-Wno-unused-variable
LDLIBS += -lnvpair -lnsl -lc
LINTFLAGS = -msux
diff --git a/usr/src/lib/fm/libfmd_log/Makefile.com b/usr/src/lib/fm/libfmd_log/Makefile.com
index 730ac39336..6a93e83f61 100644
--- a/usr/src/lib/fm/libfmd_log/Makefile.com
+++ b/usr/src/lib/fm/libfmd_log/Makefile.com
@@ -40,6 +40,7 @@ SRCDIR = ../common
CPPFLAGS += -I../common -I.
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CERRWARN += -_gcc=-Wno-uninitialized
LDLIBS += -lexacct -lnvpair -lgen -lc
LINTFLAGS = -msux
diff --git a/usr/src/lib/fm/libfmd_msg/Makefile.com b/usr/src/lib/fm/libfmd_msg/Makefile.com
index b704cf62d8..a2a731da0e 100644
--- a/usr/src/lib/fm/libfmd_msg/Makefile.com
+++ b/usr/src/lib/fm/libfmd_msg/Makefile.com
@@ -40,6 +40,8 @@ SRCDIR = ../common
CPPFLAGS += -I../common -I.
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
LDLIBS += -lnvpair -lc
LINTFLAGS = -msux
diff --git a/usr/src/lib/fm/libfmevent/Makefile.com b/usr/src/lib/fm/libfmevent/Makefile.com
index 5a3510b49e..ce3f9b4dae 100644
--- a/usr/src/lib/fm/libfmevent/Makefile.com
+++ b/usr/src/lib/fm/libfmevent/Makefile.com
@@ -59,6 +59,10 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-uninitialized
+
FMLIBDIR=usr/lib/fm
$(BUILD64)FMLIBDIR64=usr/lib/fm/$(MACH64)
diff --git a/usr/src/lib/fm/libldom/Makefile.com b/usr/src/lib/fm/libldom/Makefile.com
index e01f062c10..859a177363 100644
--- a/usr/src/lib/fm/libldom/Makefile.com
+++ b/usr/src/lib/fm/libldom/Makefile.com
@@ -42,6 +42,8 @@ CPPFLAGS += -I. -I$(SRC)/uts/sun4v -I$(ROOT)/usr/platform/sun4v/include \
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CERRWARN += -_gcc=-Wno-parentheses
+
$(DYNLIB) := LDLIBS += $(MACH_LDLIBS)
$(DYNLIB) := LDLIBS += -lfmd_agent -lnvpair -lscf -lmdesc -lc -lxml2 -lsocket \
-lumem
diff --git a/usr/src/lib/fm/topo/libtopo/Makefile.com b/usr/src/lib/fm/topo/libtopo/Makefile.com
index 180aa2a49b..56871dd6d4 100644
--- a/usr/src/lib/fm/topo/libtopo/Makefile.com
+++ b/usr/src/lib/fm/topo/libtopo/Makefile.com
@@ -78,6 +78,9 @@ CPPFLAGS += -I../common -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I.
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
LINTFLAGS = -msux
LINTFLAGS64 = -msux -m64
diff --git a/usr/src/lib/fm/topo/modules/Makefile.plugin b/usr/src/lib/fm/topo/modules/Makefile.plugin
index 246ce77a5c..d67acbfe7d 100644
--- a/usr/src/lib/fm/topo/modules/Makefile.plugin
+++ b/usr/src/lib/fm/topo/modules/Makefile.plugin
@@ -58,6 +58,9 @@ ROOTCONF = $($(CLASS)_ROOTCONF)
LINTFLAGS = -msux
LINTFILES = $(SRCS:%.c=%.ln)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+
APIMAP = ../../../libtopo/common/topo_mod.map
MAPFILES = # use APIMAP instead
diff --git a/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c b/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c
index 6e3ad18b93..559020efe5 100644
--- a/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c
+++ b/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c
@@ -271,7 +271,7 @@ ipmi_platform_message(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
/*
* The spec states that any values between 0x20 and 0x29 are
* legitimate for "system software". However, some versions of
- * Sun's ILOM rejects messages over /dev/ipmi with a generator
+ * Sun's ILOM rejects messages over /dev/ipmi0 with a generator
* of 0x20, so we use 0x21 instead.
*/
pem.ipem_generator = 0x21;
diff --git a/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com b/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com
index 53625989fd..7379a16129 100644
--- a/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
#
# This make file will build mech_dh.so.1. This shared object
@@ -52,6 +50,10 @@ $(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
CPPFLAGS += -I../mech -I../crypto -I$(SRC)/uts/common/gssapi/include
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(PICS) := CFLAGS += $(XFFLAG)
$(PICS) := CCFLAGS += $(XFFLAG)
$(PICS) := CFLAGS64 += $(XFFLAG)
diff --git a/usr/src/lib/gss_mechs/mech_dummy/Makefile.com b/usr/src/lib/gss_mechs/mech_dummy/Makefile.com
index 4335c5acf5..9118d6f4ca 100644
--- a/usr/src/lib/gss_mechs/mech_dummy/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_dummy/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
#
# The mech_dummy shared object contains all the functionality needed to
@@ -42,6 +40,9 @@ MAPFILES =
CPPFLAGS += -I../../libgss -I$(SRC)/uts/common/gssapi/include \
-I$(ROOT)/usr/include/gssapi
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_dummy/Makefile.export
$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
diff --git a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
index 38c43bc573..d1c68cea64 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
@@ -251,6 +251,16 @@ CPPFLAGS += -I$(REL_PATH)/libgss -I../include \
CPPFLAGS += $(KRB5_DEFS)
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-empty-body
+CERRWARN += -_gcc=-Wno-address
+
MAPFILE_EXPORT = ../mapfile-vers-clean
$(EXPORT_RELEASE_BUILD)MAPFILE_EXPORT = \
$(CLOSED)/lib/gss_mechs/mech_krb5/mapfile-vers-export
diff --git a/usr/src/lib/gss_mechs/mech_spnego/Makefile.com b/usr/src/lib/gss_mechs/mech_spnego/Makefile.com
index ee9a87e049..a8adb3afde 100644
--- a/usr/src/lib/gss_mechs/mech_spnego/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_spnego/Makefile.com
@@ -48,6 +48,9 @@ MAPFILES = ../mapfile-vers $(MAPFILE_EXPORT)
CPPFLAGS += -I$(SRC)/uts/common/gssapi/include $(DEBUG) -I$(SRC)/lib/gss_mechs/mech_krb5/include -I$(SRC)/uts/common/gssapi/mechs/krb5/include -I$(SRC)/lib/gss_mechs/mech_krb5/mech
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-type-limits
+
MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_spnego/Makefile.export
$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
diff --git a/usr/src/lib/hbaapi/Makefile.com b/usr/src/lib/hbaapi/Makefile.com
index 54dd62919f..9dc4272593 100644
--- a/usr/src/lib/hbaapi/Makefile.com
+++ b/usr/src/lib/hbaapi/Makefile.com
@@ -40,6 +40,11 @@ SRCDIR= ../common
INCS += -I$(SRCDIR)
CPPFLAGS += $(INCS)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
+
LDLIBS += -lc
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/krb5/dyn/Makefile.com b/usr/src/lib/krb5/dyn/Makefile.com
index c772a4897f..501893d8c6 100644
--- a/usr/src/lib/krb5/dyn/Makefile.com
+++ b/usr/src/lib/krb5/dyn/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libdyn.a
VERS= .1
@@ -63,6 +61,8 @@ CPPFLAGS += -D_REENTRANT -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \
CFLAGS += $(CCVERBOSE) -I..
LDLIBS += -lc
+CERRWARN += -_gcc=-Wno-unused-variable
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/krb5/kadm5/clnt/Makefile.com b/usr/src/lib/krb5/kadm5/clnt/Makefile.com
index 5be5ff8a2f..44d13ddcc5 100644
--- a/usr/src/lib/krb5/kadm5/clnt/Makefile.com
+++ b/usr/src/lib/krb5/kadm5/clnt/Makefile.com
@@ -80,6 +80,12 @@ CPPFLAGS += -I.. -I../.. -I../../.. -I$(SRC)/lib/gss_mechs/mech_krb5/include \
-DHAVE_STRFTIME=1 -DHAVE_VSPRINTF=1 -DUSE_KADM5_API_VERSION=2
CFLAGS += $(CCVERBOSE) -I..
+
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
LDLIBS += -lc
.KEEP_STATE:
diff --git a/usr/src/lib/krb5/kadm5/srv/Makefile.com b/usr/src/lib/krb5/kadm5/srv/Makefile.com
index 81d762b27c..96d3aba6e6 100644
--- a/usr/src/lib/krb5/kadm5/srv/Makefile.com
+++ b/usr/src/lib/krb5/kadm5/srv/Makefile.com
@@ -87,6 +87,12 @@ CPPFLAGS += -I.. -I../.. -I../../.. \
CFLAGS += $(CCVERBOSE) -I..
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/krb5/kdb/Makefile.com b/usr/src/lib/krb5/kdb/Makefile.com
index ca7dde1daf..b75f6e5e3e 100644
--- a/usr/src/lib/krb5/kdb/Makefile.com
+++ b/usr/src/lib/krb5/kdb/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libkdb.a
VERS= .1
@@ -83,6 +81,12 @@ CPPFLAGS += -DHAVE_CONFIG_H -DHAVE_BT_RSEQ \
CFLAGS += $(CCVERBOSE) -I..
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+
DYNFLAGS += $(KRUNPATH) $(KMECHLIB)
LDLIBS += -lc -lnsl
diff --git a/usr/src/lib/krb5/plugins/kdb/db2/Makefile.com b/usr/src/lib/krb5/plugins/kdb/db2/Makefile.com
index 19ae7f9e4f..064c9d7e4b 100644
--- a/usr/src/lib/krb5/plugins/kdb/db2/Makefile.com
+++ b/usr/src/lib/krb5/plugins/kdb/db2/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= db2.a
VERS= .1
@@ -66,6 +64,10 @@ CPPFLAGS += -DHAVE_CONFIG_H -DHAVE_BT_RSEQ \
-I$(SRC)/uts/common/gssapi/mechs/krb5/include
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
DYNFLAGS += $(KRUNPATH) $(KERBRUNPATH) $(KMECHLIB)
LDLIBS += -L $(ROOTLIBDIR) -ldb2 -lkdb -lkadm5srv -lc -lnsl
diff --git a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com
index a7ff254dac..aec2ac074b 100644
--- a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com
+++ b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libdb2.a
VERS= .1
@@ -103,6 +101,7 @@ CPPFLAGS += -DHAVE_CONFIG_H \
-I$(SRC)/lib/gss_mechs/mech_krb5/include #for db-ndbm.h
CFLAGS += $(CCVERBOSE) -I..
+CERRWARN += -_gcc=-Wno-uninitialized
LDLIBS += -lc
# Identify that this library is an interposer (on dbm_ routines from libc.so.1).
diff --git a/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com b/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com
index b92f19520a..72a6b80cab 100644
--- a/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com
+++ b/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com
@@ -60,6 +60,8 @@ CPPFLAGS += -DHAVE_CONFIG_H \
-DUSE_KADM5_API_VERSION=2
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-function
DYNFLAGS += $(KERBRUNPATH)
# setting -L $(ROOT)/usr/lib/gss because libkdb_ldap needs mech_krb5
diff --git a/usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/Makefile.com b/usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/Makefile.com
index aa7e830953..0f094f2b4d 100644
--- a/usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/Makefile.com
+++ b/usr/src/lib/krb5/plugins/kdb/ldap/libkdb_ldap/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libkdb_ldap.a
VERS= .1
@@ -76,6 +74,8 @@ CPPFLAGS += -DHAVE_CONFIG_H \
-DUSE_KADM5_API_VERSION=2
CFLAGS += $(CCVERBOSE) -I..
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-function
DYNFLAGS += $(KRUNPATH) $(KERBRUNPATH) $(KMECHLIB)
LDLIBS += -L $(ROOTLIBDIR) -lkadm5srv -lc -lnsl -lldap
diff --git a/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com b/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com
index 58c7935dde..8449d22e24 100644
--- a/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com
+++ b/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com
@@ -65,6 +65,9 @@ CPPFLAGS += -I$(SRC)/lib/krb5 \
-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
-I$(SRC)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-function
+
CFLAGS += $(CCVERBOSE) -I..
DYNFLAGS += $(KRUNPATH) $(KMECHLIB) -znodelete
LDLIBS += -L $(ROOTLIBDIR) -lcrypto -lc
diff --git a/usr/src/lib/krb5/ss/Makefile.com b/usr/src/lib/krb5/ss/Makefile.com
index c87da9f2c8..424c5293d4 100644
--- a/usr/src/lib/krb5/ss/Makefile.com
+++ b/usr/src/lib/krb5/ss/Makefile.com
@@ -66,6 +66,8 @@ CPPFLAGS += -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAS_STRDUP=1 \
-I$(SRC)/lib/krb5
CFLAGS += $(CCVERBOSE) -I..
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-unused-variable
DYNFLAGS += $(KRUNPATH) $(KMECHLIB) $(ZIGNORE)
diff --git a/usr/src/lib/libadm/Makefile.com b/usr/src/lib/libadm/Makefile.com
index 58420e2cfc..4631c50bf4 100644
--- a/usr/src/lib/libadm/Makefile.com
+++ b/usr/src/lib/libadm/Makefile.com
@@ -43,6 +43,10 @@ SRCDIR= ../common
CPPFLAGS += -I ../inc
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-char-subscripts
+
$(LINTLIB) := SRCS=$(SRCDIR)/$(LINTSRC)
LDLIBS += -lc
diff --git a/usr/src/lib/libadutils/Makefile.com b/usr/src/lib/libadutils/Makefile.com
index 7d474526dc..8776b44c86 100644
--- a/usr/src/lib/libadutils/Makefile.com
+++ b/usr/src/lib/libadutils/Makefile.com
@@ -41,6 +41,9 @@ $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(SRCDIR) -I$(SRC)/lib/libldap5/include/ldap
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+
lint := OBJECTS = $(LINT_OBJECTS)
.KEEP_STATE:
diff --git a/usr/src/lib/libast/Makefile.com b/usr/src/lib/libast/Makefile.com
index a4e30d6989..91c6388ed8 100644
--- a/usr/src/lib/libast/Makefile.com
+++ b/usr/src/lib/libast/Makefile.com
@@ -723,6 +723,19 @@ CFLAGS += \
CFLAGS64 += \
$(ASTCFLAGS64)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+CERRWARN += -_gcc=-Wno-empty-body
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-address
+
pics/$(MACH)/src/lib/libast/conftab.o \
pics/$(MACH64)/src/lib/libast/conftab.o := CERRWARN += -erroff=E_INIT_DOES_NOT_FIT
pics/common/comp/setlocale.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
diff --git a/usr/src/lib/libbc/sparc/Makefile b/usr/src/lib/libbc/sparc/Makefile
index b1b66bfa43..7503bae833 100644
--- a/usr/src/lib/libbc/sparc/Makefile
+++ b/usr/src/lib/libbc/sparc/Makefile
@@ -327,6 +327,15 @@ ASFLAGS= -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM $(CPPFLAGS)
LDLIBS= -t -R/usr/ucblib -L$(ROOT)/usr/ucblib $(LDLIBS.lib) \
-lucb -lc -lnsl -lsocket
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-extra
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-address
+
# SONAME is used by DYNFLAGS
$(DYNLIB4X) := SONAME = $(DYNLIB4X)
$(DYNLIBS5) := SONAME = $(DYNLIBS5)
diff --git a/usr/src/lib/libbe/Makefile.com b/usr/src/lib/libbe/Makefile.com
index 3e283deb4e..b8349c1d1a 100644
--- a/usr/src/lib/libbe/Makefile.com
+++ b/usr/src/lib/libbe/Makefile.com
@@ -24,7 +24,7 @@
#
# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
#
-
+
LIBRARY= libbe.a
VERS= .1
@@ -51,6 +51,9 @@ C99MODE= $(C99_ENABLE)
LDLIBS += -lzfs -linstzones -luuid -lnvpair -lc -lgen -ldevinfo
CPPFLAGS += $(INCS)
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-address
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libbsm/Makefile.com b/usr/src/lib/libbsm/Makefile.com
index 5d1e207ff5..0d5bc4976d 100644
--- a/usr/src/lib/libbsm/Makefile.com
+++ b/usr/src/lib/libbsm/Makefile.com
@@ -85,6 +85,9 @@ CLEANFILES += $(LINTOUT) $(LINTLIB)
CFLAGS += $(CCVERBOSE)
LDLIBS += -lsocket -lnsl -lmd -lc -lsecdb -ltsol -linetutil -lscf
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
COMDIR= ../common
AUDITD= $(SRC)/cmd/auditd
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile
index 1f71b06463..2f37212a55 100644
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -973,6 +973,18 @@ CFLAGS64 += $(CTF_FLAGS)
# We probably don't want any inlining anyway.
CFLAGS64 += -xinline=
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-address
+
# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
# enables ASSERT() checking in the threads portion of the library.
# This is automatically enabled for DEBUG builds, not for non-debug builds.
diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com
index e01da08091..41721e4f3f 100644
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -1016,6 +1016,18 @@ CFLAGS += $(CCVERBOSE) $(CTF_FLAGS)
XINLINE = -xinline=
CFLAGS += $(XINLINE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-address
+
# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
# enables ASSERT() checking in the threads portion of the library.
# This is automatically enabled for DEBUG builds, not for non-debug builds.
diff --git a/usr/src/lib/libc/sparc/Makefile.com b/usr/src/lib/libc/sparc/Makefile.com
index 4267e4b6c1..8b27e58b92 100644
--- a/usr/src/lib/libc/sparc/Makefile.com
+++ b/usr/src/lib/libc/sparc/Makefile.com
@@ -1051,6 +1051,18 @@ CFLAGS += $(CCVERBOSE)
# We probably don't want any inlining anyway.
CFLAGS += -xinline=
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-address
+
# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
# enables ASSERT() checking in the threads portion of the library.
# This is automatically enabled for DEBUG builds, not for non-debug builds.
@@ -1206,10 +1218,6 @@ TIL= \
$(TIL:%=pics/%) := CFLAGS += $(LIBCBASE)/threads/sparc.il
-# This hack is needed because sparc GCC3 generates DWARF data about TLS which
-# The Sun assembler cannot process
-$(__GNUC3)pics/tls_data.o := CC = env 'CW_NO_SHADOW=1' $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-
# special kludge for inlines with 'cas':
pics/rwlock.o pics/synch.o pics/lwp.o pics/door_calls.o := \
sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus
diff --git a/usr/src/lib/libc/sparcv9/Makefile.com b/usr/src/lib/libc/sparcv9/Makefile.com
index 518e255e36..fa727d133c 100644
--- a/usr/src/lib/libc/sparcv9/Makefile.com
+++ b/usr/src/lib/libc/sparcv9/Makefile.com
@@ -996,6 +996,18 @@ CFLAGS64 += $(CCVERBOSE)
# We probably don't want any inlining anyway.
CFLAGS64 += -xinline=
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-address
+
# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
# enables ASSERT() checking in the threads portion of the library.
# This is automatically enabled for DEBUG builds, not for non-debug builds.
@@ -1138,10 +1150,6 @@ TIL= \
$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/sparcv9.il
-# This hack is needed because sparc GCC3 generates DWARF data about TLS which
-# The Sun assembler cannot process
-$(__GNUC3)pics/tls_data.o := CC = env 'CW_NO_SHADOW=1' $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-
# Files in fp, port/fp subdirectories that need base.il inline template
IL= \
__flt_decim.o \
diff --git a/usr/src/lib/libc_db/Makefile.com b/usr/src/lib/libc_db/Makefile.com
index ecd5baa67e..60f1f0cd96 100644
--- a/usr/src/lib/libc_db/Makefile.com
+++ b/usr/src/lib/libc_db/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libc_db.a
VERS = .1
@@ -46,9 +44,11 @@ $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
ASFLAGS += -P -D__STDC__ -D_ASM -DPIC
CPPFLAGS += -I../../libc/inc -D_REENTRANT
CFLAGS += $(CCVERBOSE)
-CFLAGS += $(CCVERBOSE)
LDLIBS += -lc
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libcfgadm/Makefile.com b/usr/src/lib/libcfgadm/Makefile.com
index e2d2ff8bd6..55747cb387 100644
--- a/usr/src/lib/libcfgadm/Makefile.com
+++ b/usr/src/lib/libcfgadm/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libcfgadm.a
VERS = .1
@@ -38,6 +36,8 @@ SRCDIR = ../common
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-unused-label
.KEEP_STATE:
diff --git a/usr/src/lib/libcmd/Makefile.com b/usr/src/lib/libcmd/Makefile.com
index 2760d3dbdb..c3725e124b 100644
--- a/usr/src/lib/libcmd/Makefile.com
+++ b/usr/src/lib/libcmd/Makefile.com
@@ -132,6 +132,12 @@ CFLAGS += \
CFLAGS64 += \
$(ASTCFLAGS64)
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+
pics/cut.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
pics/sync.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
pics/vmstate.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
diff --git a/usr/src/lib/libcpc/Makefile.com b/usr/src/lib/libcpc/Makefile.com
index b18942e533..428955e904 100644
--- a/usr/src/lib/libcpc/Makefile.com
+++ b/usr/src/lib/libcpc/Makefile.com
@@ -45,6 +45,9 @@ ASFLAGS += -P -D_ASM -I../common
CPPFLAGS += -D_REENTRANT -I../common
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libcrypt/Makefile.com b/usr/src/lib/libcrypt/Makefile.com
index 2f93024301..8e98a38912 100644
--- a/usr/src/lib/libcrypt/Makefile.com
+++ b/usr/src/lib/libcrypt/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libcrypt.a
VERS= .1
@@ -48,6 +46,9 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I../inc -I../../common/inc -I../../libgen/inc
LDLIBS += -lgen -lc
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libcryptoutil/Makefile.com b/usr/src/lib/libcryptoutil/Makefile.com
index d4183effb9..b6df76e3c4 100644
--- a/usr/src/lib/libcryptoutil/Makefile.com
+++ b/usr/src/lib/libcryptoutil/Makefile.com
@@ -51,6 +51,9 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I$(SRCDIR)
LINTFLAGS64 += -errchk=longptr64
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
all: $(LIBS)
lint: lintcheck
diff --git a/usr/src/lib/libctf/Makefile.com b/usr/src/lib/libctf/Makefile.com
index 267d67aa18..4d1e01d4eb 100644
--- a/usr/src/lib/libctf/Makefile.com
+++ b/usr/src/lib/libctf/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libctf.a
VERS = .1
@@ -55,6 +53,9 @@ SRCDIR = ../common
CPPFLAGS += -I../common -I../../../common/ctf -DCTF_OLD_VERSIONS
CFLAGS += $(CCVERBOSE)
+
+CERRWARN += -_gcc=-Wno-uninitialized
+
LDLIBS += -lc
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libcurses/Makefile.com b/usr/src/lib/libcurses/Makefile.com
index 19a25fc2ab..b295f4b536 100644
--- a/usr/src/lib/libcurses/Makefile.com
+++ b/usr/src/lib/libcurses/Makefile.com
@@ -148,6 +148,10 @@ CLEANFILES += $(LINTOUT) $(LINTLIB)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+
LDLIBS += -lc
CPPFLAGS += -I../screen -I../../common/inc
diff --git a/usr/src/lib/libdevice/Makefile.com b/usr/src/lib/libdevice/Makefile.com
index 269cb501e7..49b8083fa6 100644
--- a/usr/src/lib/libdevice/Makefile.com
+++ b/usr/src/lib/libdevice/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libdevice.a
VERS= .1
@@ -39,6 +37,8 @@ $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT
+CERRWARN += -_gcc=-Wno-parentheses
+
all: $(LIBS)
lint: lintcheck
diff --git a/usr/src/lib/libdevinfo/Makefile.com b/usr/src/lib/libdevinfo/Makefile.com
index 6d010b8053..690d2aea59 100644
--- a/usr/src/lib/libdevinfo/Makefile.com
+++ b/usr/src/lib/libdevinfo/Makefile.com
@@ -30,7 +30,6 @@ OBJECTS= devfsinfo.o devinfo.o devinfo_prop_decode.o devinfo_devlink.o \
devinfo_devperm.o devfsmap.o devinfo_profile.o \
devinfo_finddev.o devinfo_dli.o devinfo_dim.o \
devinfo_realpath.o devinfo_retire.o
-
include ../../Makefile.lib
include ../../Makefile.rootfs
@@ -41,6 +40,8 @@ $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I..
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
.KEEP_STATE:
diff --git a/usr/src/lib/libdhcpagent/Makefile.com b/usr/src/lib/libdhcpagent/Makefile.com
index 7b68b64299..c01532cac2 100644
--- a/usr/src/lib/libdhcpagent/Makefile.com
+++ b/usr/src/lib/libdhcpagent/Makefile.com
@@ -40,6 +40,7 @@ SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-type-limits
.KEEP_STATE:
diff --git a/usr/src/lib/libdhcpdu/Makefile.com b/usr/src/lib/libdhcpdu/Makefile.com
index c758684255..cbab028471 100644
--- a/usr/src/lib/libdhcpdu/Makefile.com
+++ b/usr/src/lib/libdhcpdu/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = rfc2136.a
VERS = .1
@@ -44,6 +42,9 @@ SRCDIR = ../common
LINTFLAGS += -erroff=E_CONSTANT_CONDITION
CPPFLAGS += -D_REENTRANT -I../../libresolv2/include
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
MAPFILES = ../common/mapfile
.KEEP_STATE:
diff --git a/usr/src/lib/libdhcpsvc/Makefile.com b/usr/src/lib/libdhcpsvc/Makefile.com
index df7838be2e..30ba2e8b04 100644
--- a/usr/src/lib/libdhcpsvc/Makefile.com
+++ b/usr/src/lib/libdhcpsvc/Makefile.com
@@ -22,11 +22,11 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include $(SRC)/lib/Makefile.lib
COMDIR = $(SRC)/common/net/dhcp
CPPFLAGS += -I$(SRC)/lib/libdhcpsvc/head -D_REENTRANT
+
+CERRWARN += -_gcc=-Wno-uninitialized
diff --git a/usr/src/lib/libdhcputil/Makefile.com b/usr/src/lib/libdhcputil/Makefile.com
index 342f71f16d..c8a695b368 100644
--- a/usr/src/lib/libdhcputil/Makefile.com
+++ b/usr/src/lib/libdhcputil/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libdhcputil.a
VERS = .1
@@ -46,6 +44,8 @@ SRCS = $(LOCOBJS:%.o=$(SRCDIR)/%.c) $(COMOBJS:%.o=$(COMDIR)/%.c)
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
CPPFLAGS += -I$(COMDIR)
.KEEP_STATE:
diff --git a/usr/src/lib/libdisasm/Makefile.com b/usr/src/lib/libdisasm/Makefile.com
index 07280f6d5a..32614b2262 100644
--- a/usr/src/lib/libdisasm/Makefile.com
+++ b/usr/src/lib/libdisasm/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
#
# The build process for libdisasm is sightly different from that used by other
@@ -100,6 +98,9 @@ ASFLAGS += -P $(ASFLAGS_$(CURTYPE)) -D_ASM
$(LINTLIB) := SRCS = $(COMDIR)/$(LINTSRC)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
# We want the thread-specific errno in the library, but we don't want it in
# the standalone. $(DTS_ERRNO) is designed to add -D_TS_ERRNO to $(CPPFLAGS),
# in order to enable this feature. Conveniently, -D_REENTRANT does the same
diff --git a/usr/src/lib/libdiskmgt/Makefile.com b/usr/src/lib/libdiskmgt/Makefile.com
index f840110dbf..37598c8fc5 100644
--- a/usr/src/lib/libdiskmgt/Makefile.com
+++ b/usr/src/lib/libdiskmgt/Makefile.com
@@ -44,6 +44,9 @@ SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
CPPFLAGS += -D_REENTRANT -I$(SRC)/lib/libdiskmgt/common
.KEEP_STATE:
diff --git a/usr/src/lib/libdladm/Makefile.com b/usr/src/lib/libdladm/Makefile.com
index 5c61d566bc..5bb56d1440 100644
--- a/usr/src/lib/libdladm/Makefile.com
+++ b/usr/src/lib/libdladm/Makefile.com
@@ -42,6 +42,10 @@ SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-uninitialized
CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
.KEEP_STATE:
diff --git a/usr/src/lib/libdll/Makefile.com b/usr/src/lib/libdll/Makefile.com
index 20ec620bc7..745aabb9f1 100644
--- a/usr/src/lib/libdll/Makefile.com
+++ b/usr/src/lib/libdll/Makefile.com
@@ -83,6 +83,9 @@ CFLAGS += \
CFLAGS64 += \
$(ASTCFLAGS64)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libdlpi/Makefile.com b/usr/src/lib/libdlpi/Makefile.com
index 621cb0b217..474a349943 100644
--- a/usr/src/lib/libdlpi/Makefile.com
+++ b/usr/src/lib/libdlpi/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libdlpi.a
VERS = .1
@@ -42,6 +40,7 @@ SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
.KEEP_STATE:
diff --git a/usr/src/lib/libdns_sd/Makefile.com b/usr/src/lib/libdns_sd/Makefile.com
index 4b6fe00f9b..4dfbabb468 100644
--- a/usr/src/lib/libdns_sd/Makefile.com
+++ b/usr/src/lib/libdns_sd/Makefile.com
@@ -21,8 +21,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libdns_sd.a
VERS = .1
@@ -38,9 +36,12 @@ SRCDIR = ../common
LDLIBS += -lsocket -lc
C99MODE = $(C99_ENABLE)
-CFLAGS += -erroff=E_ASSIGNMENT_TYPE_MISMATCH
CPPFLAGS += -I$(SRCDIR) -DNOT_HAVE_SA_LEN
+CERRWARN += -erroff=E_ASSIGNMENT_TYPE_MISMATCH
+
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+
.PARALLEL = $(OBJECTS)
.KEEP_STATE:
diff --git a/usr/src/lib/libdscfg/Makefile.com b/usr/src/lib/libdscfg/Makefile.com
index 2aadbede42..b12fb3a2b8 100644
--- a/usr/src/lib/libdscfg/Makefile.com
+++ b/usr/src/lib/libdscfg/Makefile.com
@@ -53,6 +53,12 @@ LINTFLAGS += -erroff=E_BAD_FORMAT_ARG_TYPE2
LINTOUT= lint.out
LINTOUT_INTER= lintinter.out
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-address
+
ROOTLINTDIR= $(ROOTLIBDIR)
ROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%)
diff --git a/usr/src/lib/libdtrace/Makefile.com b/usr/src/lib/libdtrace/Makefile.com
index 085f5c5e28..d92d33dff7 100644
--- a/usr/src/lib/libdtrace/Makefile.com
+++ b/usr/src/lib/libdtrace/Makefile.com
@@ -123,6 +123,13 @@ CLOBBERFILES += drti.o
CPPFLAGS += -I../common -I.
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-switch
+
YYCFLAGS =
LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc -lzonecfg
DRTILDLIBS = $(LDLIBS.lib) -lc
diff --git a/usr/src/lib/libdtrace_jni/Makefile.com b/usr/src/lib/libdtrace_jni/Makefile.com
index 6d2aad2d0c..9d605b3c59 100644
--- a/usr/src/lib/libdtrace_jni/Makefile.com
+++ b/usr/src/lib/libdtrace_jni/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libdtrace_jni.a
VERS = .1
@@ -50,6 +48,9 @@ CPPFLAGS += -I$(JAVA_ROOT)/include -I$(JAVA_ROOT)/include/solaris
CPPFLAGS += -I../java/native
CFLAGS += $(CCVERBOSE) -K PIC
CFLAGS64 += $(CCVERBOSE) -K PIC
+
+CERRWARN += -_gcc=-Wno-uninitialized
+
LDLIBS += -lc -luutil -ldtrace -lproc
LINTLIB =
diff --git a/usr/src/lib/libeti/form/Makefile.com b/usr/src/lib/libeti/form/Makefile.com
index 932a603632..465eddae38 100644
--- a/usr/src/lib/libeti/form/Makefile.com
+++ b/usr/src/lib/libeti/form/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libform.a
VERS= .1
@@ -77,6 +75,10 @@ CPPFLAGS += -I../inc
CFLAGS += $(CCVERBOSE)
LDLIBS += -lcurses -lc
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-char-subscripts
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libeti/menu/Makefile.com b/usr/src/lib/libeti/menu/Makefile.com
index 14eeb40cfa..2782c3bc6c 100644
--- a/usr/src/lib/libeti/menu/Makefile.com
+++ b/usr/src/lib/libeti/menu/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libmenu.a
VERS= .1
@@ -75,6 +73,8 @@ CPPFLAGS += -I../inc
CFLAGS += $(CCVERBOSE)
LDLIBS += -lcurses -lc
+CERRWARN += -_gcc=-Wno-parentheses
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libeti/panel/Makefile.com b/usr/src/lib/libeti/panel/Makefile.com
index 4baeb2867d..2783c77ee4 100644
--- a/usr/src/lib/libeti/panel/Makefile.com
+++ b/usr/src/lib/libeti/panel/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libpanel.a
VERS= .1
@@ -51,6 +49,8 @@ CPPFLAGS += -I../inc
CFLAGS += $(CCVERBOSE)
LDLIBS += -lcurses -lc
+CERRWARN += -_gcc=-Wno-parentheses
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libexacct/Makefile.com b/usr/src/lib/libexacct/Makefile.com
index 82925b1906..bc3332a971 100644
--- a/usr/src/lib/libexacct/Makefile.com
+++ b/usr/src/lib/libexacct/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libexacct.a
VERS = .1
@@ -43,6 +41,7 @@ SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
CPPFLAGS += -D_FILE_OFFSET_BITS=64
debug := CPPFLAGS += -DLIBEXACCT_DEBUG
diff --git a/usr/src/lib/libexacct/demo/Makefile b/usr/src/lib/libexacct/demo/Makefile
index 1e0e7a313a..76159a4914 100644
--- a/usr/src/lib/libexacct/demo/Makefile
+++ b/usr/src/lib/libexacct/demo/Makefile
@@ -31,6 +31,7 @@ include ../../../cmd/Makefile.cmd
LDLIBS += -lexacct -lproject -lsocket -lnsl
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
.KEEP_STATE:
diff --git a/usr/src/lib/libfdisk/Makefile.com b/usr/src/lib/libfdisk/Makefile.com
index f253312c8e..7e05c8f947 100644
--- a/usr/src/lib/libfdisk/Makefile.com
+++ b/usr/src/lib/libfdisk/Makefile.com
@@ -52,6 +52,8 @@ CFLAGS64 += -D_FILE_OFFSET_BITS=64
LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libfru/libfruraw/Makefile.com b/usr/src/lib/libfru/libfruraw/Makefile.com
index 1302bceca9..76bdea8a36 100644
--- a/usr/src/lib/libfru/libfruraw/Makefile.com
+++ b/usr/src/lib/libfru/libfruraw/Makefile.com
@@ -52,6 +52,8 @@ CPPFLAGS += -I.. \
CPPFLAGS += -D_REENTRANT
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(LINTLIB) := LINTFLAGS = -nvx -I..
$(LINTLIB) := LINTFLAGS64 = -nvx -m64 -I..
diff --git a/usr/src/lib/libfru/libfrureg/Makefile.com b/usr/src/lib/libfru/libfrureg/Makefile.com
index b377d791be..f52ae73c86 100644
--- a/usr/src/lib/libfru/libfrureg/Makefile.com
+++ b/usr/src/lib/libfru/libfrureg/Makefile.com
@@ -56,6 +56,8 @@ CPPFLAGS += -I.. \
CPPFLAGS += -D_REENTRANT
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-unused-variable
+
$(LINTLIB) := LINTFLAGS = -nvx -I..
$(LINTLIB) := LINTFLAGS64 = -nvx -m64 -I..
diff --git a/usr/src/lib/libfru/libnvfru/Makefile.com b/usr/src/lib/libfru/libnvfru/Makefile.com
index 1acea847d2..5dc2723b30 100644
--- a/usr/src/lib/libfru/libnvfru/Makefile.com
+++ b/usr/src/lib/libfru/libnvfru/Makefile.com
@@ -50,6 +50,8 @@ CPPFLAGS += -I.. \
CPPFLAGS += -D_REENTRANT
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+
$(LINTLIB) := LINTFLAGS = -nvx -I..
$(LINTLIB) := LINTFLAGS64 = -nvx -m64 -I..
diff --git a/usr/src/lib/libfruutils/Makefile.com b/usr/src/lib/libfruutils/Makefile.com
index 63bb8347a3..37c2ba8a6d 100644
--- a/usr/src/lib/libfruutils/Makefile.com
+++ b/usr/src/lib/libfruutils/Makefile.com
@@ -50,6 +50,9 @@ CLEANFILES= $(LINTOUT)
CPPFLAGS += -I.. -D_REENTRANT
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(LINTLIB) := LINTFLAGS = -nvx
$(LINTLIB) := LINTFLAGS64 = -nvx -m64
diff --git a/usr/src/lib/libfsmgt/Makefile.com b/usr/src/lib/libfsmgt/Makefile.com
index d0fd25a89d..c265c052dd 100644
--- a/usr/src/lib/libfsmgt/Makefile.com
+++ b/usr/src/lib/libfsmgt/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libfsmgt.a
VERS = .1
@@ -49,11 +47,13 @@ LDLIBS += -lc -lnsl -lkstat
SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
-#add nfs/lib directory as part of the include path
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(SRC)/lib/libfsmgt/common \
-I$(SRC)/cmd/fs.d/nfs/lib
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libgen/Makefile.com b/usr/src/lib/libgen/Makefile.com
index f3974592c4..52bace544f 100644
--- a/usr/src/lib/libgen/Makefile.com
+++ b/usr/src/lib/libgen/Makefile.com
@@ -42,6 +42,10 @@ $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -D_LARGEFILE64_SOURCE -I../inc -I../../common/inc
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libgss/Makefile.com b/usr/src/lib/libgss/Makefile.com
index ee197cbb7b..48b984a96b 100644
--- a/usr/src/lib/libgss/Makefile.com
+++ b/usr/src/lib/libgss/Makefile.com
@@ -106,6 +106,11 @@ CPPFLAGS += -I$(GSSCRED_DIR) -I$(SRC)/uts/common/gssapi/include \
-I$(SRC)/lib/gss_mechs/mech_krb5/include/ \
-DHAVE_STDLIB_H
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-empty-body
+
$(EXPORT_RELEASE_BUILD)include $(CLOSED)/lib/libgss/Makefile.export
.KEEP_STATE:
diff --git a/usr/src/lib/libhotplug/Makefile.com b/usr/src/lib/libhotplug/Makefile.com
index e463eca54d..92fb91de2a 100644
--- a/usr/src/lib/libhotplug/Makefile.com
+++ b/usr/src/lib/libhotplug/Makefile.com
@@ -36,6 +36,8 @@ SRCDIR = ../common
CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
+CERRWARN += -_gcc=-Wno-parentheses
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libidmap/Makefile.com b/usr/src/lib/libidmap/Makefile.com
index e50bbe02a1..39f2ccd957 100644
--- a/usr/src/lib/libidmap/Makefile.com
+++ b/usr/src/lib/libidmap/Makefile.com
@@ -53,6 +53,9 @@ IDMAP_PROT_X = $(SRC)/uts/common/rpcsvc/idmap_prot.x
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(SRCDIR)
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-switch
+
CLOBBERFILES += idmap_xdr.c
lint := OBJECTS = $(LINT_OBJECTS)
diff --git a/usr/src/lib/libima/Makefile.com b/usr/src/lib/libima/Makefile.com
index 48f4c5b6e6..c9e20a1db4 100644
--- a/usr/src/lib/libima/Makefile.com
+++ b/usr/src/lib/libima/Makefile.com
@@ -39,17 +39,20 @@ LIBS = $(DYNLIB) $(LINTLIB)
LDLIBS += -lc
CFLAGS += -mt
-CFLAGS += -v
+CFLAGS += $(CCVERBOSE)
CFLAGS += -xCC
CFLAGS += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
CFLAGS += -DSOLARIS
CFLAGS64 += -mt
-CFLAGS64 += -v
+CFLAGS64 += $(CCVERBOSE)
CFLAGS64 += -xCC
CFLAGS64 += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
CFLAGS64 += -DSOLARIS
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+
LINTFLAGS += -DSOLARIS
LINTFLAGS64 += -DSOLARIS
diff --git a/usr/src/lib/libinetsvc/Makefile.com b/usr/src/lib/libinetsvc/Makefile.com
index 164d31c196..be13b64f96 100644
--- a/usr/src/lib/libinetsvc/Makefile.com
+++ b/usr/src/lib/libinetsvc/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libinetsvc.a
VERS = .1
@@ -41,6 +39,10 @@ CFLAGS += $(CCVERBOSE) -Wp,-xc99=%all
CPPFLAGS += -I../common -D_REENTRANT
$(RELEASE_BUILD)CPPFLAGS += -DNDEBUG
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libinetutil/Makefile.com b/usr/src/lib/libinetutil/Makefile.com
index 231dadfb58..e866d1c434 100644
--- a/usr/src/lib/libinetutil/Makefile.com
+++ b/usr/src/lib/libinetutil/Makefile.com
@@ -48,6 +48,9 @@ LDLIBS += -lsocket -lc
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRCDIR)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libinstzones/Makefile.com b/usr/src/lib/libinstzones/Makefile.com
index 994d0e5e91..b00c58f370 100644
--- a/usr/src/lib/libinstzones/Makefile.com
+++ b/usr/src/lib/libinstzones/Makefile.com
@@ -53,6 +53,10 @@ LINTFLAGS= -umx -errtags \
-erroff=E_BAD_PTR_CAST_ALIGN,E_BAD_PTR_CAST
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-address
+
LIBS = $(DYNLIB) $(LINTLIB)
DYNFLAGS += $(ZLAZYLOAD)
diff --git a/usr/src/lib/libipadm/Makefile.com b/usr/src/lib/libipadm/Makefile.com
index 3b6827a7fb..33685ff755 100644
--- a/usr/src/lib/libipadm/Makefile.com
+++ b/usr/src/lib/libipadm/Makefile.com
@@ -41,6 +41,8 @@ SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
.KEEP_STATE:
diff --git a/usr/src/lib/libipmi/Makefile.com b/usr/src/lib/libipmi/Makefile.com
index 059c574685..eef10e59af 100644
--- a/usr/src/lib/libipmi/Makefile.com
+++ b/usr/src/lib/libipmi/Makefile.com
@@ -58,6 +58,8 @@ LDLIBS += -lc -lm -lnvpair -lsocket -lnsl
CPPFLAGS += $(INCS)
C99MODE = $(C99_ENABLE)
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
.KEEP_STATE:
diff --git a/usr/src/lib/libipsecutil/Makefile.com b/usr/src/lib/libipsecutil/Makefile.com
index b0d4f6a190..de17899c49 100644
--- a/usr/src/lib/libipsecutil/Makefile.com
+++ b/usr/src/lib/libipsecutil/Makefile.com
@@ -41,6 +41,9 @@ LDLIBS += $(LAZYLIBS)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRCDIR)
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libiscsit/Makefile.com b/usr/src/lib/libiscsit/Makefile.com
index ac7a6facc1..f733019450 100644
--- a/usr/src/lib/libiscsit/Makefile.com
+++ b/usr/src/lib/libiscsit/Makefile.com
@@ -43,6 +43,7 @@ C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
LDLIBS += -lc -lnvpair -lstmf -luuid -lnsl -lscf
CPPFLAGS += $(INCS) -D_REENTRANT
+CERRWARN += -_gcc=-Wno-parentheses
SRCS= $(OBJS_COMMON:%.o=$(SRCDIR)/%.c) \
$(ISCSIT_OBJS_SHARED:%.o=$(SRC)/common/iscsit/%.c) \
diff --git a/usr/src/lib/libkmf/ber_der/Makefile.com b/usr/src/lib/libkmf/ber_der/Makefile.com
index bbf6f26209..6654e7cfde 100644
--- a/usr/src/lib/libkmf/ber_der/Makefile.com
+++ b/usr/src/lib/libkmf/ber_der/Makefile.com
@@ -49,6 +49,8 @@ CPPFLAGS64 += -I$(ADJUNCT_PROTO)/usr/include/libxml2 \
-I$(INCDIR) -I../../include
LDLIBS += -lc
+CERRWARN += -_gcc=-Wno-unused-label
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libkmf/libkmf/Makefile.com b/usr/src/lib/libkmf/libkmf/Makefile.com
index c5aa4f8db8..a704d1e5a8 100644
--- a/usr/src/lib/libkmf/libkmf/Makefile.com
+++ b/usr/src/lib/libkmf/libkmf/Makefile.com
@@ -66,6 +66,11 @@ $(DYNLIB64) := LDLIBS64 += -lxml2
CPPFLAGS += -I$(INCDIR) -I$(ADJUNCT_PROTO)/usr/include/libxml2 \
-I../../ber_der/inc -I$(SRCDIR)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libkmf/plugins/kmf_nss/Makefile.com b/usr/src/lib/libkmf/plugins/kmf_nss/Makefile.com
index 3034f44bc6..3b5f23aa92 100644
--- a/usr/src/lib/libkmf/plugins/kmf_nss/Makefile.com
+++ b/usr/src/lib/libkmf/plugins/kmf_nss/Makefile.com
@@ -55,6 +55,10 @@ PICS= $(OBJECTS:%=pics/%)
LINTFLAGS += -erroff=E_STATIC_UNUSED
LINTFLAGS64 += -erroff=E_STATIC_UNUSED
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-uninitialized
+
lint:= NSSLIBS = $(BERLIB)
lint:= NSSLIBS64 = $(BERLIB64)
diff --git a/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com b/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com
index abcbd6173a..76ecd38479 100644
--- a/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com
+++ b/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com
@@ -50,6 +50,10 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT $(KMFINC) \
-I$(INCDIR) -I$(ADJUNCT_PROTO)/usr/include/libxml2
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-uninitialized
+
PICS= $(OBJECTS:%=pics/%)
lint:= OPENSSLLIBS= $(LINTSSLLIBS)
diff --git a/usr/src/lib/libkmf/plugins/kmf_pkcs11/Makefile.com b/usr/src/lib/libkmf/plugins/kmf_pkcs11/Makefile.com
index a81e2515a0..0b69e23fd6 100644
--- a/usr/src/lib/libkmf/plugins/kmf_pkcs11/Makefile.com
+++ b/usr/src/lib/libkmf/plugins/kmf_pkcs11/Makefile.com
@@ -53,6 +53,8 @@ CPPFLAGS += -D_REENTRANT $(KMFINC) -I$(INCDIR) \
-I$(ADJUNCT_PROTO)/usr/include/libxml2 -I$(BIGNUMDIR)
LINTFLAGS64 += -errchk=longptr64
+CERRWARN += -_gcc=-Wno-unused-label
+
PICS= $(OBJECTS:%=pics/%)
LDLIBS += $(PKCS11LIBS)
diff --git a/usr/src/lib/libkvm/Makefile.com b/usr/src/lib/libkvm/Makefile.com
index f85c414bf4..9bef6968ba 100644
--- a/usr/src/lib/libkvm/Makefile.com
+++ b/usr/src/lib/libkvm/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libkvm.a
VERS= .1
@@ -48,6 +46,8 @@ LDLIBS += -lelf -lc
CPPFLAGS = -D_KMEMUSER -D_LARGEFILE64_SOURCE=1 -I.. $(CPPFLAGS.master)
+CERRWARN += -_gcc=-Wno-uninitialized
+
CLOBBERFILES += test test.o
.KEEP_STATE:
diff --git a/usr/src/lib/libldap5/Makefile.com b/usr/src/lib/libldap5/Makefile.com
index 4761f423c9..ee48739eea 100644
--- a/usr/src/lib/libldap5/Makefile.com
+++ b/usr/src/lib/libldap5/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libldap.a
VERS= .5
@@ -113,6 +111,15 @@ sparcv9_C_PICFLAGS = $(sparcv9_C_BIGPICFLAGS)
CFLAGS += $(CCVERBOSE) $(LOCFLAGS)
CFLAGS64 += $(LOCFLAGS)
+
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-address
+
LDLIBS += -lsasl -lsocket -lnsl -lmd -lc
.KEEP_STATE:
diff --git a/usr/src/lib/libmapid/Makefile.com b/usr/src/lib/libmapid/Makefile.com
index 895cb8f898..2b1eaac8a5 100644
--- a/usr/src/lib/libmapid/Makefile.com
+++ b/usr/src/lib/libmapid/Makefile.com
@@ -54,6 +54,9 @@ LDLIBS += -lresolv -lc -lscf
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRCDIR) -I$(SMF_DIR) -D_REENTRANT
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
.KEEP_STATE:
diff --git a/usr/src/lib/libmtmalloc/Makefile.com b/usr/src/lib/libmtmalloc/Makefile.com
index a141c2d208..ae66153665 100644
--- a/usr/src/lib/libmtmalloc/Makefile.com
+++ b/usr/src/lib/libmtmalloc/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libmtmalloc.a
VERS = .1
@@ -46,6 +44,8 @@ DYNFLAGS += $(ZINTERPOSE)
$(LINTLIB) lint := LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
$(LINTLIB) lint := LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libndmp/Makefile.com b/usr/src/lib/libndmp/Makefile.com
index 8b81a2dc50..0100610434 100644
--- a/usr/src/lib/libndmp/Makefile.com
+++ b/usr/src/lib/libndmp/Makefile.com
@@ -52,6 +52,9 @@ LIBS= $(DYNLIB) $(LINTLIB)
LDLIBS += -lc -lscf
CPPFLAGS += $(INCS) -D_REENTRANT
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-uninitialized
+
SRCS= $(OBJECTS:%.o=$(SRCDIR)/%.c)
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libnisdb/Makefile b/usr/src/lib/libnisdb/Makefile
index d8983800be..08d1cf8ad8 100644
--- a/usr/src/lib/libnisdb/Makefile
+++ b/usr/src/lib/libnisdb/Makefile
@@ -136,6 +136,13 @@ $(LARGEPICS) := i386_C_PICFLAGS = $(C_BIGPICFLAGS)
CPPFLAGS += -D_REENTRANT
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
+
# Extra includes, from yp, for yptol files.
CPPFLAGS += -I$(SRC)/cmd/ypcmd
diff --git a/usr/src/lib/libnls/Makefile.com b/usr/src/lib/libnls/Makefile.com
index e19d456bb1..ad699dfca7 100644
--- a/usr/src/lib/libnls/Makefile.com
+++ b/usr/src/lib/libnls/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libnls.a
VERS= .1
@@ -42,6 +40,8 @@ LINTSRC= $(LINTLIB:%.ln=%)
CFLAGS += $(CCVERBOSE)
LDLIBS += -lnsl -lc
+CERRWARN += -_gcc=-Wno-unused-variable
+
.KEEP_STATE:
lint: lintcheck
diff --git a/usr/src/lib/libnsl/Makefile.com b/usr/src/lib/libnsl/Makefile.com
index 8469102553..809a7edf4a 100644
--- a/usr/src/lib/libnsl/Makefile.com
+++ b/usr/src/lib/libnsl/Makefile.com
@@ -200,6 +200,15 @@ CFLAGS64 += $(XSTRCONST)
CCFLAGS += -_CC=-features=conststrings
CCFLAGS64 += -_CC=-features=conststrings
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-empty-body
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-clobbered
+
LIBMP = -lmp
lint := LIBMP =
LDLIBS += $(LIBMP) -lmd -lc
diff --git a/usr/src/lib/libnsl/nsl/t_error.c b/usr/src/lib/libnsl/nsl/t_error.c
index cc316dea2a..4bd7448e07 100644
--- a/usr/src/lib/libnsl/nsl/t_error.c
+++ b/usr/src/lib/libnsl/nsl/t_error.c
@@ -26,10 +26,9 @@
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Copyright (c) 2012 Gary Mills
*/
-#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
-
#include "mt.h"
#include <xti.h>
#include <errno.h>
@@ -42,21 +41,19 @@ int
_tx_error(const char *s, int api_semantics)
{
const char *c;
- int n;
+ int errnum = errno; /* In case a system call fails. */
c = t_strerror(t_errno);
if (s != NULL && *s != '\0') {
- n = strlen(s);
- if (n) {
- (void) write(2, s, (unsigned)n);
- (void) write(2, ": ", 2);
- }
+ (void) write(2, s, strlen(s));
+ (void) write(2, ": ", 2);
}
- (void) write(2, c, (unsigned)strlen(c));
+ (void) write(2, c, strlen(c));
if (t_errno == TSYSERR) {
+ c = strerror(errnum);
(void) write(2, ": ", 2);
- perror("");
- } else
- (void) write(2, "\n", 1);
+ (void) write(2, c, strlen(c));
+ }
+ (void) write(2, "\n", 1);
return (0);
}
diff --git a/usr/src/lib/libnvpair/Makefile.com b/usr/src/lib/libnvpair/Makefile.com
index b278c85672..6a21376eb3 100644
--- a/usr/src/lib/libnvpair/Makefile.com
+++ b/usr/src/lib/libnvpair/Makefile.com
@@ -56,6 +56,10 @@ LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
LINTFLAGS += -erroff=E_BAD_FORMAT_STR2
LINTFLAGS64 += -erroff=E_BAD_FORMAT_STR2
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT
diff --git a/usr/src/lib/libnwam/Makefile.com b/usr/src/lib/libnwam/Makefile.com
index e193da49d5..b569916b63 100644
--- a/usr/src/lib/libnwam/Makefile.com
+++ b/usr/src/lib/libnwam/Makefile.com
@@ -51,6 +51,9 @@ $(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libpam/Makefile.com b/usr/src/lib/libpam/Makefile.com
index 4e0262afb9..3eb16f8baf 100644
--- a/usr/src/lib/libpam/Makefile.com
+++ b/usr/src/lib/libpam/Makefile.com
@@ -39,6 +39,8 @@ LDLIBS += -lc
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I $(SRCDIR)
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libparted/Makefile.com b/usr/src/lib/libparted/Makefile.com
index 28cb243da9..2d79d23cc4 100644
--- a/usr/src/lib/libparted/Makefile.com
+++ b/usr/src/lib/libparted/Makefile.com
@@ -117,6 +117,10 @@ CPPFLAGS += -I$(SRCDIR)/lib -I$(SRCDIR)/include
DYNFLAGS += $(ZINTERPOSE)
LDLIBS += -ldiskmgt -luuid -lc -lnvpair
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-type-limits
+
.KEEP_STATE:
#
diff --git a/usr/src/lib/libpcp/Makefile.com b/usr/src/lib/libpcp/Makefile.com
index 43328dbebd..21f26dd465 100644
--- a/usr/src/lib/libpcp/Makefile.com
+++ b/usr/src/lib/libpcp/Makefile.com
@@ -47,6 +47,7 @@ LINKED_LLIBLPCP_DIR = \
LIBS = $(DYNLIB) $(LINTLIB)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
LDLIBS += -lc -lumem -ldevinfo
PLATLIBS = $(USR_PLAT_DIR)/$(PLATFORM)/lib
INS.slink6= $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/libpcp.so.1 $@
diff --git a/usr/src/lib/libpicltree/Makefile.com b/usr/src/lib/libpicltree/Makefile.com
index bb88e33d2e..e444c69527 100644
--- a/usr/src/lib/libpicltree/Makefile.com
+++ b/usr/src/lib/libpicltree/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libpicltree.a
VERS= .1
@@ -38,6 +36,8 @@ $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CPPFLAGS += -D_REENTRANT -I.. -I../../libpicl -I$(SRC)/cmd/picl/plugins/inc
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all : $(LIBS)
diff --git a/usr/src/lib/libpkg/Makefile.com b/usr/src/lib/libpkg/Makefile.com
index 054752764f..8f56a61423 100644
--- a/usr/src/lib/libpkg/Makefile.com
+++ b/usr/src/lib/libpkg/Makefile.com
@@ -67,6 +67,12 @@ LIBS = $(DYNLIB) $(LINTLIB)
LDLIBS += -lc -lssl -lwanboot -lcrypto -lscf -ladm
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-unused-value
CPPFLAGS += -I$(SRCDIR) -D_FILE_OFFSET_BITS=64
.KEEP_STATE:
diff --git a/usr/src/lib/libpool/Makefile.com b/usr/src/lib/libpool/Makefile.com
index ffad924f32..13b8a05cc1 100644
--- a/usr/src/lib/libpool/Makefile.com
+++ b/usr/src/lib/libpool/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libpool.a
VERS = .1
@@ -53,6 +51,9 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 \
-I$(ADJUNCT_PROTO)/usr/include/libxml2
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
.KEEP_STATE:
diff --git a/usr/src/lib/libpp/Makefile.com b/usr/src/lib/libpp/Makefile.com
index ebdedc2806..1b3923d70e 100644
--- a/usr/src/lib/libpp/Makefile.com
+++ b/usr/src/lib/libpp/Makefile.com
@@ -98,6 +98,12 @@ CFLAGS += \
CFLAGS64 += \
$(ASTCFLAGS64)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-empty-body
+CERRWARN += -_gcc=-Wno-unused-value
+
pics/ppcall.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
pics/ppcontrol.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
pics/ppcpp.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
diff --git a/usr/src/lib/libproc/Makefile.com b/usr/src/lib/libproc/Makefile.com
index 042b42fd53..794c54f3eb 100644
--- a/usr/src/lib/libproc/Makefile.com
+++ b/usr/src/lib/libproc/Makefile.com
@@ -20,6 +20,7 @@
#
#
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
#
LIBRARY = libproc.a
@@ -30,6 +31,7 @@ CMNOBJS = \
Pcontrol.o \
Pcore.o \
Pexecname.o \
+ Pfdinfo.o \
Pgcore.o \
Pidle.o \
Pisprocdir.o \
@@ -72,7 +74,14 @@ CMNOBJS = \
ISAOBJS = \
Pisadep.o
-OBJECTS = $(CMNOBJS) $(ISAOBJS)
+amd64_SAVEOBJS = \
+ saveargs.o
+
+amd64_CPPFLAGS = -I$(SRC)/common/saveargs
+
+SAVEOBJS = $($(MACH64)_SAVEOBJS)
+
+OBJECTS = $(CMNOBJS) $(ISAOBJS) $(SAVEOBJS)
# include library definitions
include ../../Makefile.lib
@@ -82,6 +91,7 @@ SRCS = $(CMNOBJS:%.o=../common/%.c) $(ISAOBJS:%.o=%.c)
LIBS = $(DYNLIB) $(LINTLIB)
LDLIBS += -lrtld_db -lelf -lctf -lc
+CPPFLAGS += $($(MACH64)_CPPFLAGS)
SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
@@ -89,6 +99,11 @@ $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRCDIR)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-unused-label
+
# All interfaces are interposable, therefore don't allow direct binding to
# libproc. Disable libproc from directly binding to itself, but allow libperl
# to directly bind to its dependencies (ie. map -Bdirect -> -zdirect). Ensure
@@ -108,3 +123,7 @@ include ../../Makefile.targ
objs/%.o pics/%.o: %.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)
+
+objs/%.o pics/%.o: $(SRC)/common/saveargs/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
diff --git a/usr/src/lib/libproc/amd64/Pisadep.c b/usr/src/lib/libproc/amd64/Pisadep.c
index a78e304d4c..8ef8340b02 100644
--- a/usr/src/lib/libproc/amd64/Pisadep.c
+++ b/usr/src/lib/libproc/amd64/Pisadep.c
@@ -36,6 +36,7 @@
#include <errno.h>
#include <string.h>
+#include <saveargs.h>
#include "Pcontrol.h"
#include "Pstack.h"
@@ -346,6 +347,121 @@ ucontext_n_to_prgregs(const ucontext_t *src, prgregset_t dst)
(void) memcpy(dst, src->uc_mcontext.gregs, sizeof (gregset_t));
}
+/*
+ * Read arguments from the frame indicated by regs into args, return the
+ * number of arguments successfully read
+ */
+static int
+read_args(struct ps_prochandle *P, uintptr_t fp, uintptr_t pc, prgreg_t *args,
+ size_t argsize)
+{
+ GElf_Sym sym;
+ ctf_file_t *ctfp = NULL;
+ ctf_funcinfo_t finfo;
+ prsyminfo_t si = {0};
+ uint8_t ins[SAVEARGS_INSN_SEQ_LEN];
+ size_t insnsize;
+ int argc = 0;
+ int rettype = 0;
+ int start_index = 0;
+ int args_style = 0;
+ int i;
+ ctf_id_t args_types[5];
+
+ if (Pxlookup_by_addr(P, pc, NULL, 0, &sym, &si) != 0)
+ return (0);
+
+ if ((ctfp = Paddr_to_ctf(P, pc)) == NULL)
+ return (0);
+
+ if (ctf_func_info(ctfp, si.prs_id, &finfo) == CTF_ERR)
+ return (0);
+
+ argc = finfo.ctc_argc;
+
+ if (argc == 0)
+ return (0);
+
+ rettype = ctf_type_kind(ctfp, finfo.ctc_return);
+
+ /*
+ * If the function returns a structure or union greater than 16 bytes
+ * in size %rdi contains the address in which to store the return
+ * value rather than for an argument.
+ */
+ if (((rettype == CTF_K_STRUCT) || (rettype == CTF_K_UNION)) &&
+ ctf_type_size(ctfp, finfo.ctc_return) > 16)
+ start_index = 1;
+ else
+ start_index = 0;
+
+ /*
+ * If any of the first 5 arguments are a structure less than 16 bytes
+ * in size, it will be passed spread across two argument registers,
+ * and we will not cope.
+ */
+ if (ctf_func_args(ctfp, si.prs_id, 5, args_types) == CTF_ERR)
+ return (0);
+
+ for (i = 0; i < MIN(5, finfo.ctc_argc); i++) {
+ int t = ctf_type_kind(ctfp, args_types[i]);
+
+ if (((t == CTF_K_STRUCT) || (t == CTF_K_UNION)) &&
+ ctf_type_size(ctfp, args_types[i]) <= 16)
+ return (0);
+ }
+
+ /*
+ * The number of instructions to search for argument saving is limited
+ * such that only instructions prior to %pc are considered and we
+ * never read arguments from a function where the saving code has not
+ * in fact yet executed.
+ */
+ insnsize = MIN(MIN(sym.st_size, SAVEARGS_INSN_SEQ_LEN),
+ pc - sym.st_value);
+
+ if (Pread(P, ins, insnsize, sym.st_value) != insnsize)
+ return (0);
+
+ if ((argc != 0) &&
+ ((args_style = saveargs_has_args(ins, insnsize, argc,
+ start_index)) != SAVEARGS_NO_ARGS)) {
+ int regargs = MIN((6 - start_index), argc);
+ size_t size = regargs * sizeof (long);
+ int i;
+
+ /*
+ * If Studio pushed a structure return address as an argument,
+ * we need to read one more argument than actually exists (the
+ * addr) to make everything line up.
+ */
+ if (args_style == SAVEARGS_STRUCT_ARGS)
+ size += sizeof (long);
+
+ if (Pread(P, args, size, (fp - size)) != size)
+ return (0);
+
+ for (i = 0; i < (regargs / 2); i++) {
+ prgreg_t t = args[i];
+
+ args[i] = args[regargs - i - 1];
+ args[regargs - i - 1] = t;
+ }
+
+ if (argc > regargs) {
+ size = MIN((argc - regargs) * sizeof (long),
+ argsize - (regargs * sizeof (long)));
+
+ if (Pread(P, &args[regargs], size, fp +
+ (sizeof (uintptr_t) * 2)) != size)
+ return (6);
+ }
+
+ return (argc);
+ } else {
+ return (0);
+ }
+}
int
Pstack_iter(struct ps_prochandle *P, const prgregset_t regs,
@@ -381,7 +497,7 @@ Pstack_iter(struct ps_prochandle *P, const prgregset_t regs,
prgreg_t signo;
siginfo_t *sip;
} sigframe_t;
- prgreg_t args[32];
+ prgreg_t args[32] = {0};
if (P->status.pr_dmodel != PR_MODEL_LP64)
return (Pstack_iter32(P, regs, func, arg));
@@ -400,20 +516,16 @@ Pstack_iter(struct ps_prochandle *P, const prgregset_t regs,
if (fp != 0 &&
Pread(P, &frame, sizeof (frame), (uintptr_t)fp) ==
sizeof (frame)) {
-
- if (frame.pc != -1) {
- /*
- * Function arguments are not available on
- * amd64 without extensive DWARF processing.
- */
- argc = 0;
- } else {
+ if (frame.pc == -1) {
argc = 3;
args[2] = fp + sizeof (sigframe_t);
if (Pread(P, &args, 2 * sizeof (prgreg_t),
fp + 2 * sizeof (prgreg_t)) !=
2 * sizeof (prgreg_t))
argc = 0;
+ } else {
+ argc = read_args(P, fp, pc, args,
+ sizeof (args));
}
} else {
(void) memset(&frame, 0, sizeof (frame));
diff --git a/usr/src/lib/libproc/common/Pcontrol.c b/usr/src/lib/libproc/common/Pcontrol.c
index 2a32522e0c..1e7ce1556e 100644
--- a/usr/src/lib/libproc/common/Pcontrol.c
+++ b/usr/src/lib/libproc/common/Pcontrol.c
@@ -24,6 +24,7 @@
* Use is subject to license terms.
*
* Portions Copyright 2007 Chad Mynhier
+ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
*/
#include <assert.h>
@@ -986,6 +987,13 @@ Pfree(struct ps_prochandle *P)
}
free(P->hashtab);
}
+
+ while (P->num_fd > 0) {
+ fd_info_t *fip = list_next(&P->fd_head);
+ list_unlink(fip);
+ free(fip);
+ P->num_fd--;
+ }
(void) mutex_unlock(&P->proc_lock);
(void) mutex_destroy(&P->proc_lock);
diff --git a/usr/src/lib/libproc/common/Pcontrol.h b/usr/src/lib/libproc/common/Pcontrol.h
index 192038b9b6..4774093b6d 100644
--- a/usr/src/lib/libproc/common/Pcontrol.h
+++ b/usr/src/lib/libproc/common/Pcontrol.h
@@ -22,6 +22,9 @@
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
+ */
#ifndef _PCONTROL_H
#define _PCONTROL_H
@@ -136,6 +139,11 @@ typedef struct lwp_info { /* per-lwp information from core file */
#endif
} lwp_info_t;
+typedef struct fd_info {
+ plist_t fd_list; /* linked list */
+ prfdinfo_t fd_info; /* fd info */
+} fd_info_t;
+
typedef struct core_info { /* information specific to core files */
char core_dmodel; /* data model for core file */
int core_errno; /* error during initialization if != 0 */
@@ -223,6 +231,8 @@ struct ps_prochandle {
uintptr_t *ucaddrs; /* ucontext-list addresses */
uint_t ucnelems; /* number of elements in the ucaddrs list */
char *zoneroot; /* cached path to zone root */
+ plist_t fd_head; /* head of file desc info list */
+ int num_fd; /* number of file descs in list */
};
/* flags */
@@ -269,6 +279,8 @@ extern char *Plofspath(const char *, char *, size_t);
extern char *Pzoneroot(struct ps_prochandle *, char *, size_t);
extern char *Pzonepath(struct ps_prochandle *, const char *, char *,
size_t);
+extern fd_info_t *Pfd2info(struct ps_prochandle *, int);
+
extern char *Pfindmap(struct ps_prochandle *, map_info_t *, char *,
size_t);
diff --git a/usr/src/lib/libproc/common/Pcore.c b/usr/src/lib/libproc/common/Pcore.c
index de868725db..3e0350eb04 100644
--- a/usr/src/lib/libproc/common/Pcore.c
+++ b/usr/src/lib/libproc/common/Pcore.c
@@ -22,6 +22,9 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
+ */
#include <sys/types.h>
#include <sys/utsname.h>
@@ -300,6 +303,26 @@ err:
}
static int
+note_fdinfo(struct ps_prochandle *P, size_t nbytes)
+{
+ prfdinfo_t prfd;
+ fd_info_t *fip;
+
+ if ((nbytes < sizeof (prfd)) ||
+ (read(P->asfd, &prfd, sizeof (prfd)) != sizeof (prfd))) {
+ dprintf("Pgrab_core: failed to read NT_FDINFO\n");
+ return (-1);
+ }
+
+ if ((fip = Pfd2info(P, prfd.pr_fd)) == NULL) {
+ dprintf("Pgrab_core: failed to add NT_FDINFO\n");
+ return (-1);
+ }
+ (void) memcpy(&fip->fd_info, &prfd, sizeof (prfd));
+ return (0);
+}
+
+static int
note_platform(struct ps_prochandle *P, size_t nbytes)
{
char *plat;
@@ -701,6 +724,7 @@ static int (*nhdlrs[])(struct ps_prochandle *, size_t) = {
note_priv_info, /* 19 NT_PRPRIVINFO */
note_content, /* 20 NT_CONTENT */
note_zonename, /* 21 NT_ZONENAME */
+ note_fdinfo, /* 22 NT_FDINFO */
};
/*
diff --git a/usr/src/lib/libproc/common/Pfdinfo.c b/usr/src/lib/libproc/common/Pfdinfo.c
new file mode 100644
index 0000000000..0d41b5606d
--- /dev/null
+++ b/usr/src/lib/libproc/common/Pfdinfo.c
@@ -0,0 +1,168 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
+ */
+
+#include <limits.h>
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <ctype.h>
+#include <string.h>
+#include <sys/mkdev.h>
+
+#include "libproc.h"
+#include "Pcontrol.h"
+
+/*
+ * Pfdinfo.c - obtain open file information.
+ */
+
+/*
+ * Allocate an fd_info structure and stick it on the list.
+ * (Unless one already exists.) The list is sorted in
+ * reverse order. We will traverse it in that order later.
+ * This makes the usual ordered insert *fast*.
+ */
+fd_info_t *
+Pfd2info(struct ps_prochandle *P, int fd)
+{
+ fd_info_t *fip = list_next(&P->fd_head);
+ fd_info_t *next;
+ int i;
+
+ if (fip == NULL) {
+ list_link(&P->fd_head, NULL);
+ fip = list_next(&P->fd_head);
+ }
+
+ for (i = 0; i < P->num_fd; i++, fip = list_next(fip)) {
+ if (fip->fd_info.pr_fd == fd) {
+ return (fip);
+ }
+ if (fip->fd_info.pr_fd < fd) {
+ break;
+ }
+ }
+
+ next = fip;
+ if ((fip = calloc(1, sizeof (*fip))) == NULL)
+ return (NULL);
+
+ fip->fd_info.pr_fd = fd;
+ list_link(fip, next ? next : (void *)&(P->fd_head));
+ P->num_fd++;
+ return (fip);
+}
+
+/*
+ * Attempt to load the open file information from a live process.
+ */
+static void
+load_fdinfo(struct ps_prochandle *P)
+{
+ /*
+ * In the unlikely case there are *no* file descriptors open,
+ * we will keep rescanning the proc directory, which will be empty.
+ * This is an edge case it isn't worth adding additional state to
+ * to eliminate.
+ */
+ if (P->num_fd > 0) {
+ return;
+ }
+
+ if (P->state != PS_DEAD && P->state != PS_IDLE) {
+ char dir_name[PATH_MAX];
+ char path[PATH_MAX];
+ struct dirent *ent;
+ DIR *dirp;
+ int fd;
+
+ /*
+ * Try to get the path information first.
+ */
+ (void) snprintf(dir_name, sizeof (dir_name),
+ "%s/%d/path", procfs_path, (int)P->pid);
+ dirp = opendir(dir_name);
+ if (dirp == NULL) {
+ return;
+ }
+ ent = NULL;
+ while ((ent = readdir(dirp)) != NULL) {
+ fd_info_t *fip;
+ prfdinfo_t *info;
+ int len;
+ struct stat64 stat;
+
+ if (!isdigit(ent->d_name[0]))
+ continue;
+
+ fd = atoi(ent->d_name);
+
+ fip = Pfd2info(P, fd);
+ info = &fip->fd_info;
+ info->pr_fd = fd;
+
+ if (pr_fstat64(P, fd, &stat) == 0) {
+ info->pr_mode = stat.st_mode;
+ info->pr_uid = stat.st_uid;
+ info->pr_gid = stat.st_gid;
+ info->pr_major = major(stat.st_dev);
+ info->pr_minor = minor(stat.st_dev);
+ info->pr_rmajor = major(stat.st_rdev);
+ info->pr_rminor = minor(stat.st_rdev);
+ info->pr_size = stat.st_size;
+ info->pr_ino = stat.st_ino;
+ }
+
+ info->pr_fileflags = pr_fcntl(P, fd, F_GETXFL, 0);
+ info->pr_fdflags = pr_fcntl(P, fd, F_GETFD, 0);
+ info->pr_offset = pr_llseek(P, fd, 0, SEEK_CUR);
+
+ /* attempt to determine the path to it */
+ (void) snprintf(path, sizeof (path),
+ "%s/%d/path/%d", procfs_path, (int)P->pid, fd);
+ len = readlink(path, info->pr_path,
+ sizeof (info->pr_path) - 1);
+
+ if (len < 0) {
+ info->pr_path[0] = 0;
+ } else {
+ info->pr_path[len] = 0;
+ }
+ }
+ (void) closedir(dirp);
+
+ }
+}
+
+int
+Pfdinfo_iter(struct ps_prochandle *P, proc_fdinfo_f *func, void *cd)
+{
+ fd_info_t *fip;
+ int rv;
+
+ /* Make sure we have live data, if appropriate */
+ load_fdinfo(P);
+
+ /* NB: We walk the list backwards. */
+
+ for (fip = list_prev(&P->fd_head);
+ fip != (void *)&P->fd_head;
+ fip = list_prev(fip)) {
+ if ((rv = func(cd, &fip->fd_info)) != 0)
+ return (rv);
+ }
+ return (0);
+}
diff --git a/usr/src/lib/libproc/common/Pgcore.c b/usr/src/lib/libproc/common/Pgcore.c
index 590c55142a..f409e96259 100644
--- a/usr/src/lib/libproc/common/Pgcore.c
+++ b/usr/src/lib/libproc/common/Pgcore.c
@@ -23,6 +23,9 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
+ */
#define _STRUCTURED_PROC 1
@@ -84,6 +87,11 @@ typedef struct {
shstrtab_t pgc_shstrtab;
} pgcore_t;
+typedef struct {
+ int fd_fd;
+ off64_t *fd_doff;
+} fditer_t;
+
static void
shstrtab_init(shstrtab_t *s)
{
@@ -543,6 +551,17 @@ new_per_lwp(void *data, const lwpstatus_t *lsp, const lwpsinfo_t *lip)
return (0);
}
+static int
+iter_fd(void *data, prfdinfo_t *fdinfo)
+{
+ fditer_t *iter = data;
+
+ if (write_note(iter->fd_fd, NT_FDINFO, fdinfo,
+ sizeof (*fdinfo), iter->fd_doff) != 0)
+ return (1);
+ return (0);
+}
+
static uint_t
count_sections(pgcore_t *pgc)
{
@@ -1341,6 +1360,15 @@ Pfgcore(struct ps_prochandle *P, int fd, core_content_t content)
&doff) != 0)
goto err;
+ {
+ fditer_t iter;
+ iter.fd_fd = fd;
+ iter.fd_doff = &doff;
+
+ if (Pfdinfo_iter(P, iter_fd, &iter) != 0)
+ goto err;
+ }
+
#if defined(__i386) || defined(__amd64)
/* CSTYLED */
{
diff --git a/usr/src/lib/libproc/common/libproc.h b/usr/src/lib/libproc/common/libproc.h
index b4374324a1..1e59b5089f 100644
--- a/usr/src/lib/libproc/common/libproc.h
+++ b/usr/src/lib/libproc/common/libproc.h
@@ -24,6 +24,7 @@
* Use is subject to license terms.
*
* Portions Copyright 2007 Chad Mynhier
+ * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
*/
/*
@@ -713,6 +714,12 @@ extern int proc_initstdio(void);
extern int proc_flushstdio(void);
extern int proc_finistdio(void);
+/*
+ * Iterate over all open files.
+ */
+typedef int proc_fdinfo_f(void *, prfdinfo_t *);
+extern int Pfdinfo_iter(struct ps_prochandle *, proc_fdinfo_f *, void *);
+
#ifdef __cplusplus
}
#endif
diff --git a/usr/src/lib/libproc/common/mapfile-vers b/usr/src/lib/libproc/common/mapfile-vers
index c3e2eb2e8a..9482a53145 100644
--- a/usr/src/lib/libproc/common/mapfile-vers
+++ b/usr/src/lib/libproc/common/mapfile-vers
@@ -20,6 +20,7 @@
#
#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
#
#
@@ -298,6 +299,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
Pzonename;
Pzonepath;
Pzoneroot;
+ Pfdinfo_iter;
$if _x86 && _ELF32
Pldt;
diff --git a/usr/src/lib/libproject/Makefile.com b/usr/src/lib/libproject/Makefile.com
index f40d9365e2..9f5984e877 100644
--- a/usr/src/lib/libproject/Makefile.com
+++ b/usr/src/lib/libproject/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libproject.a
VERS = .1
@@ -50,6 +48,8 @@ CLEANFILES += $(LINTOUT) $(LINTLIB)
CPPFLAGS += -D_REENTRANT
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
LDLIBS += -lc -lsecdb -lproc -lpool
$(LINTLIB) := SRCS = ../common/llib-lproject
diff --git a/usr/src/lib/libprtdiag/Makefile.com b/usr/src/lib/libprtdiag/Makefile.com
index 0375fd3fe9..b0fb2b65bb 100644
--- a/usr/src/lib/libprtdiag/Makefile.com
+++ b/usr/src/lib/libprtdiag/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
#
# Create default so empty rules don't
@@ -46,6 +44,11 @@ IFLAGS += -I $(UTSBASE)/sun4u/sunfire
IFLAGS += -I $(UTSBASE)/sun4u/serengeti
CPPFLAGS = $(IFLAGS) $(CPPFLAGS.master)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-label
LDLIBS += -lc -lkstat
DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR)
diff --git a/usr/src/lib/libprtdiag_psr/sparc/Makefile.com b/usr/src/lib/libprtdiag_psr/sparc/Makefile.com
index bdc057b8df..3c58df4d3b 100644
--- a/usr/src/lib/libprtdiag_psr/sparc/Makefile.com
+++ b/usr/src/lib/libprtdiag_psr/sparc/Makefile.com
@@ -49,6 +49,12 @@ LIBS = $(DYNLIB)
MAPFILES =
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-address
IFLAGS += -I $(UTSBASE)/sun4u
IFLAGS += -I $(UTSCLOSED)/sun4u
IFLAGS += -I $(UTSCLOSED)/sun4u/sunfire -I $(UTSBASE)/sun4u/sunfire
diff --git a/usr/src/lib/libraidcfg/Makefile.com b/usr/src/lib/libraidcfg/Makefile.com
index c624f858af..1aeed69bfd 100644
--- a/usr/src/lib/libraidcfg/Makefile.com
+++ b/usr/src/lib/libraidcfg/Makefile.com
@@ -39,6 +39,7 @@ SRCDIR = ../common
$(LINTLIB):= SRCS = $(LINTSRC:%=$(SRCDIR)/%)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-type-limits
.KEEP_STATE:
diff --git a/usr/src/lib/librcm/Makefile.com b/usr/src/lib/librcm/Makefile.com
index 8d7fe5f117..cecf34f9fc 100644
--- a/usr/src/lib/librcm/Makefile.com
+++ b/usr/src/lib/librcm/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= librcm.a
VERS= .1
@@ -40,6 +38,8 @@ $(LINTLIB) := SRCS = ../llib-lrcm
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/librdc/Makefile.com b/usr/src/lib/librdc/Makefile.com
index b44b02abd2..1819191a1c 100644
--- a/usr/src/lib/librdc/Makefile.com
+++ b/usr/src/lib/librdc/Makefile.com
@@ -50,6 +50,10 @@ LINTFLAGS += -erroff=E_BAD_FORMAT_ARG_TYPE2
LINTOUT= lint.out
LINTOUT_INTER= lintinter.out
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-address
+
LINTSRC= $(LINTLIB:%.ln=%)
ROOTLINTDIR= $(ROOTLIBDIR)
ROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%)
diff --git a/usr/src/lib/libresolv/Makefile b/usr/src/lib/libresolv/Makefile
index b2637e6f89..7351ef9048 100644
--- a/usr/src/lib/libresolv/Makefile
+++ b/usr/src/lib/libresolv/Makefile
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libresolv.a
VERS= .1
@@ -57,6 +55,13 @@ C99MODE= $(C99_DISABLE)
CPPFLAGS = -I. -I../common/inc $(CPPFLAGS.master) -DDEBUG -DSYSV -D_REENTRANT
LDLIBS += -lsocket -lnsl -lc
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-implicit-int
+CERRWARN += -_gcc=-Wno-extra
+
ROOTDYNLIBS= $(DYNLIB:%=$(ROOTLIBDIR)/%)
.KEEP_STATE:
diff --git a/usr/src/lib/libresolv2/Makefile.com b/usr/src/lib/libresolv2/Makefile.com
index 3c69a169b6..c02ae222a1 100644
--- a/usr/src/lib/libresolv2/Makefile.com
+++ b/usr/src/lib/libresolv2/Makefile.com
@@ -109,6 +109,9 @@ LOCFLAGS += -D_SYS_STREAM_H -D_REENTRANT -DSVR4 -DSUNW_OPTIONS \
$(SOLCOMPAT) -I../include -I../../common/inc
CPPFLAGS += $(LOCFLAGS)
+
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+
DYNFLAGS += $(ZNODELETE)
LDLIBS += -lsocket -lnsl -lc -lmd
diff --git a/usr/src/lib/librpcsvc/Makefile.com b/usr/src/lib/librpcsvc/Makefile.com
index 21741282d0..64a77e161e 100644
--- a/usr/src/lib/librpcsvc/Makefile.com
+++ b/usr/src/lib/librpcsvc/Makefile.com
@@ -23,8 +23,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= librpcsvc.a
VERS = .1
@@ -50,6 +48,11 @@ LIBS = $(DYNLIB) $(LINTLIB)
CPPFLAGS += -DYP
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
LDLIBS += -lnsl -lc
diff --git a/usr/src/lib/librsm/Makefile.com b/usr/src/lib/librsm/Makefile.com
index ec648ce30e..5323366ddd 100644
--- a/usr/src/lib/librsm/Makefile.com
+++ b/usr/src/lib/librsm/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= librsm.a
VERS= .2
@@ -50,6 +48,9 @@ $(NOT_RELEASE_BUILD)COPTFLAG64 =
CPPFLAGS = -I../inc -I../../common/inc $(CPPFLAGS.master) -D_REENTRANT $(DEBUG)
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
+
LDLIBS += -lc
.KEEP_STATE:
diff --git a/usr/src/lib/libscf/Makefile.com b/usr/src/lib/libscf/Makefile.com
index 5c53b8803f..66b02c4fa7 100644
--- a/usr/src/lib/libscf/Makefile.com
+++ b/usr/src/lib/libscf/Makefile.com
@@ -56,6 +56,12 @@ CFLAGS += $(CCVERBOSE) -Wp,-xc99=%all
CPPFLAGS += -I../inc -I../../common/inc -I$(COMDIR) -I$(ROOTHDRDIR)
$(NOT_RELEASE_BUILD) CPPFLAGS += -DFASTREBOOT_DEBUG
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
#
# For native builds, we compile and link against the native version
# of libuutil.
diff --git a/usr/src/lib/libsec/Makefile.com b/usr/src/lib/libsec/Makefile.com
index 245c41b762..1f83f66516 100644
--- a/usr/src/lib/libsec/Makefile.com
+++ b/usr/src/lib/libsec/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libsec.a
VERS= .1
@@ -48,6 +46,11 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRCDIR) -I. -I../../../common/acl
LDLIBS += -lc -lavl -lidmap
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-variable
+
# install this library in the root filesystem
include ../../Makefile.rootfs
diff --git a/usr/src/lib/libsecdb/Makefile.com b/usr/src/lib/libsecdb/Makefile.com
index 3a9678d730..1c2076cdc7 100644
--- a/usr/src/lib/libsecdb/Makefile.com
+++ b/usr/src/lib/libsecdb/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libsecdb.a
VERS = .1
@@ -46,6 +44,9 @@ CPPFLAGS += -D_REENTRANT
LINTFLAGS += -DPIC
LINTFLAGS64 += -DPIC
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libshare/Makefile.com b/usr/src/lib/libshare/Makefile.com
index 92d1b89000..b5f057d694 100644
--- a/usr/src/lib/libshare/Makefile.com
+++ b/usr/src/lib/libshare/Makefile.com
@@ -44,6 +44,10 @@ $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(NFSLIB_DIR) \
-I$(ADJUNCT_PROTO)/usr/include/libxml2
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-switch
+CPPFLAGS += -D_REENTRANT -I$(NFSLIB_DIR) -I/usr/include/libxml2
.KEEP_STATE:
diff --git a/usr/src/lib/libshare/autofs/Makefile.com b/usr/src/lib/libshare/autofs/Makefile.com
index 65fc6fc379..0538ec55fa 100644
--- a/usr/src/lib/libshare/autofs/Makefile.com
+++ b/usr/src/lib/libshare/autofs/Makefile.com
@@ -47,7 +47,11 @@ LDLIBS += -lshare -lscf -lumem -lc -lxml2
#add nfs/lib directory as part of the include path
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(AUTOFSSMFLIB_DIR) \
- -I$(ADJUNCT_PROTO)/usr/include/libxml2 \
+ -I$(ADJUNCT_PROTO)/usr/include/libxml2
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+CPPFLAGS += -D_REENTRANT -I$(AUTOFSSMFLIB_DIR) -I/usr/include/libxml2 \
-I$(SRCDIR)../common
.KEEP_STATE:
diff --git a/usr/src/lib/libshare/nfs/Makefile.com b/usr/src/lib/libshare/nfs/Makefile.com
index fa7a7e3aaf..44e661bbe2 100644
--- a/usr/src/lib/libshare/nfs/Makefile.com
+++ b/usr/src/lib/libshare/nfs/Makefile.com
@@ -48,6 +48,12 @@ LDLIBS += -lshare -lnsl -lscf -lumem -lc -lxml2
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(NFSLIB_DIR) \
-I$(ADJUNCT_PROTO)/usr/include/libxml2 -I$(SRCDIR)/../common
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+CPPFLAGS += -D_REENTRANT -I$(NFSLIB_DIR) -I/usr/include/libxml2 \
+ -I$(SRCDIR)/../common
.KEEP_STATE:
diff --git a/usr/src/lib/libshare/smb/Makefile.com b/usr/src/lib/libshare/smb/Makefile.com
index 18ced31487..3fe65dff3c 100644
--- a/usr/src/lib/libshare/smb/Makefile.com
+++ b/usr/src/lib/libshare/smb/Makefile.com
@@ -49,7 +49,10 @@ LDLIBS += -lshare -ldlpi -lnsl -lnvpair -lscf -lumem -lc
all install := LDLIBS += -lxml2
CFLAGS += $(CCVERBOSE)
-CPPFLAGS += -D_REENTRANT -I$(ADJUNCT_PROTO)/usr/include/libxml2 \
+CPPFLAGS += -D_REENTRANT -I$(ADJUNCT_PROTO)/usr/include/libxml2
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-switch
+CPPFLAGS += -D_REENTRANT -I/usr/include/libxml2 \
-I$(SRCDIR)/../common
$(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
diff --git a/usr/src/lib/libshare/smbfs/Makefile.com b/usr/src/lib/libshare/smbfs/Makefile.com
index 501ebcfe52..fbd4b80000 100644
--- a/usr/src/lib/libshare/smbfs/Makefile.com
+++ b/usr/src/lib/libshare/smbfs/Makefile.com
@@ -19,8 +19,6 @@
# CDDL HEADER END
#
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -45,6 +43,10 @@ LDLIBS += -lshare -lscf -lumem -luuid -lc -lxml2 -lsmbfs
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(ADJUNCT_PROTO)/usr/include/libxml2 \
-I$(SRCDIR)/../common -I$(SRC)/lib/libsmbfs -I$(SRC)/uts/common
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CPPFLAGS += -D_REENTRANT -I/usr/include/libxml2 -I$(SRCDIR)/../common \
+ -I$(SRC)/lib/libsmbfs -I$(SRC)/uts/common
.KEEP_STATE:
diff --git a/usr/src/lib/libshell/Makefile.com b/usr/src/lib/libshell/Makefile.com
index 32bba5796e..8dd5057867 100644
--- a/usr/src/lib/libshell/Makefile.com
+++ b/usr/src/lib/libshell/Makefile.com
@@ -107,11 +107,11 @@ OBJDIRS = \
PICSDIRS= $(OBJDIRS:%=pics/%)
mkpicdirs:
@mkdir -p $(PICSDIRS)
-
+
# Specify the MACH we currently use to build and test ksh
LIBSHELLMACH= $(TARGETMACH)
LIBSHELLBASE=..
-
+
include ../../Makefile.astmsg
include ../../Makefile.lib
@@ -153,6 +153,14 @@ CFLAGS += \
CFLAGS64 += \
$(ASTCFLAGS64)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-char-subscripts
+
pics/sh/macro.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
pics/sh/nvdisc.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
diff --git a/usr/src/lib/libsldap/Makefile.com b/usr/src/lib/libsldap/Makefile.com
index 3eb70828f3..0d35b1f794 100644
--- a/usr/src/lib/libsldap/Makefile.com
+++ b/usr/src/lib/libsldap/Makefile.com
@@ -22,9 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# lib/libsldap/Makefile.com
LIBRARY= libsldap.a
VERS= .1
@@ -54,6 +51,10 @@ CPPFLAGS += -I../common -I$(SRC)/lib/libldap5/include/ldap \
LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libsldap/common/ns_connect.c b/usr/src/lib/libsldap/common/ns_connect.c
index 68387eaa52..a8a03c16b1 100644
--- a/usr/src/lib/libsldap/common/ns_connect.c
+++ b/usr/src/lib/libsldap/common/ns_connect.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
*/
#include <stdlib.h>
@@ -475,10 +476,10 @@ printCred(FILE *fp, const ns_cred_t *cred)
return;
}
- (void) fprintf(fp, "tid= %d: AuthType=%d", t, cred->auth.type);
- (void) fprintf(fp, "tid= %d: TlsType=%d", t, cred->auth.tlstype);
- (void) fprintf(fp, "tid= %d: SaslMech=%d", t, cred->auth.saslmech);
- (void) fprintf(fp, "tid= %d: SaslOpt=%d", t, cred->auth.saslopt);
+ (void) fprintf(fp, "tid= %d: AuthType=%d\n", t, cred->auth.type);
+ (void) fprintf(fp, "tid= %d: TlsType=%d\n", t, cred->auth.tlstype);
+ (void) fprintf(fp, "tid= %d: SaslMech=%d\n", t, cred->auth.saslmech);
+ (void) fprintf(fp, "tid= %d: SaslOpt=%d\n", t, cred->auth.saslopt);
if (cred->hostcertpath)
(void) fprintf(fp, "tid= %d: hostCertPath=%s\n",
t, cred->hostcertpath);
@@ -701,7 +702,8 @@ makeConnection(Connection **conp, const char *serverAddr,
if (conp == NULL || errorp == NULL || auth == NULL)
return (NS_LDAP_INVALID_PARAM);
- *errorp = NULL;
+ if (*errorp)
+ (void) __ns_ldap_freeError(errorp);
*conp = NULL;
(void) memset(&sinfo, 0, sizeof (sinfo));
diff --git a/usr/src/lib/libsldap/common/ns_standalone.c b/usr/src/lib/libsldap/common/ns_standalone.c
index 169efc9f3b..e18f1067f5 100644
--- a/usr/src/lib/libsldap/common/ns_standalone.c
+++ b/usr/src/lib/libsldap/common/ns_standalone.c
@@ -22,6 +22,7 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
*/
#define __STANDALONE_MODULE__
@@ -1450,6 +1451,7 @@ __ns_ldap_getRootDSE(const char *server_addr,
}
__s_api_conn_user_free(cu);
+ DropConnection(sessionId, NS_LDAP_NEW_CONN);
return (NS_LDAP_OP_FAILED);
}
__s_api_conn_user_free(cu);
diff --git a/usr/src/lib/libslp/Makefile.com b/usr/src/lib/libslp/Makefile.com
index c7b8fa21b8..80c1cc01e4 100644
--- a/usr/src/lib/libslp/Makefile.com
+++ b/usr/src/lib/libslp/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libslp.a
VERS = .1
@@ -47,6 +45,9 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I../clib -I$(JAVA_ROOT)/include \
-I$(JAVA_ROOT)/include/solaris
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+
.KEEP_STATE:
all:
diff --git a/usr/src/lib/libsmbfs/Makefile.com b/usr/src/lib/libsmbfs/Makefile.com
index f7a6c06790..a3ec0fb397 100644
--- a/usr/src/lib/libsmbfs/Makefile.com
+++ b/usr/src/lib/libsmbfs/Makefile.com
@@ -97,6 +97,9 @@ LDLIBS += -lsocket -lnsl -lc -lmd -lpkcs11 -lkrb5 -lsec -lidmap
# normal warnings...
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+
CPPFLAGS += -D__EXTENSIONS__ -D_REENTRANT -DMIA \
-I$(SRCDIR) -I.. \
-I$(SRC)/uts/common \
diff --git a/usr/src/lib/libsmedia/library/Makefile.com b/usr/src/lib/libsmedia/library/Makefile.com
index afd20c4864..e570948866 100644
--- a/usr/src/lib/libsmedia/library/Makefile.com
+++ b/usr/src/lib/libsmedia/library/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libsmedia.a
VERS=.1
@@ -54,6 +52,8 @@ CPPFLAGS += -D_REENTRANT -I$(SRC)/cmd/smserverd/
CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-unused-variable
+
LDLIBS += -lnsl -lc
.KEEP_STATE:
diff --git a/usr/src/lib/libsocket/Makefile.com b/usr/src/lib/libsocket/Makefile.com
index e2dd0778df..1d22540eee 100644
--- a/usr/src/lib/libsocket/Makefile.com
+++ b/usr/src/lib/libsocket/Makefile.com
@@ -56,6 +56,11 @@ CFLAGS64 += $(XSTRCONST)
CPPFLAGS += -DSYSV -D_REENTRANT -I../../common/inc
%/rcmd.o := CPPFLAGS += -DNIS
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
+
.KEEP_STATE:
all:
diff --git a/usr/src/lib/libsqlite/Makefile.com b/usr/src/lib/libsqlite/Makefile.com
index 5c2b47ae64..ecafa30d6c 100644
--- a/usr/src/lib/libsqlite/Makefile.com
+++ b/usr/src/lib/libsqlite/Makefile.com
@@ -2,8 +2,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
SQLITE_VERSION = 2.8.15-repcached
@@ -93,6 +91,11 @@ SRCS = \
MYCPPFLAGS = -D_REENTRANT -DTHREADSAFE=1 -DHAVE_USLEEP=1 -I. -I.. -I$(SRCDIR)
CPPFLAGS += $(MYCPPFLAGS)
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-label
+
MAPFILES = ../mapfile-sqlite
# Header files used by all library source files.
diff --git a/usr/src/lib/libstmf/Makefile.com b/usr/src/lib/libstmf/Makefile.com
index 35c04ac4a2..99ca037802 100644
--- a/usr/src/lib/libstmf/Makefile.com
+++ b/usr/src/lib/libstmf/Makefile.com
@@ -41,6 +41,8 @@ C99LMODE= -Xc99=%all
LDLIBS += -lc -lnvpair -lscf -lm
CPPFLAGS += $(INCS) -D_REENTRANT
+CERRWARN += -_gcc=-Wno-unused-label
+
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
.KEEP_STATE:
diff --git a/usr/src/lib/libsum/Makefile.com b/usr/src/lib/libsum/Makefile.com
index 244bf290f5..5fdf850a78 100644
--- a/usr/src/lib/libsum/Makefile.com
+++ b/usr/src/lib/libsum/Makefile.com
@@ -74,6 +74,8 @@ CFLAGS += \
CFLAGS64 += \
$(ASTCFLAGS64)
+CERRWARN += -_gcc=-Wno-parentheses
+
# This codepath is performance-critical
sparc_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
sparcv9_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
diff --git a/usr/src/lib/libsun_ima/Makefile.com b/usr/src/lib/libsun_ima/Makefile.com
index fd1779de3e..321b966a83 100644
--- a/usr/src/lib/libsun_ima/Makefile.com
+++ b/usr/src/lib/libsun_ima/Makefile.com
@@ -45,10 +45,11 @@ LDLIBS += -ldevinfo
LDLIBS += -lsysevent
CFLAGS += -mt
-CFLAGS += -v
+CFLAGS += $(CCVERBOSE)
+CFLAGS64 += -mt
+CFLAGS64 += $(CCVERBOSE)
-CFLAGS64 += -mt
-CFLAGS64 += -v
+CERRWARN += -_gcc=-Wno-parentheses
CPPFLAGS += -DSOLARIS
diff --git a/usr/src/lib/libtecla/Makefile.com b/usr/src/lib/libtecla/Makefile.com
index f80b1320b6..1f52c6b878 100644
--- a/usr/src/lib/libtecla/Makefile.com
+++ b/usr/src/lib/libtecla/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libtecla.a
VERS= .1
@@ -46,6 +44,8 @@ CPPFLAGS += -I$(SRCDIR) -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 \
-DPREFER_REENTRANT
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
+CERRWARN += -_gcc=-Wno-type-limits
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libtnf/Makefile b/usr/src/lib/libtnf/Makefile
index 8c6a1143c5..85abde990e 100644
--- a/usr/src/lib/libtnf/Makefile
+++ b/usr/src/lib/libtnf/Makefile
@@ -70,6 +70,8 @@ CPPFLAGS += -D_DATUM_MACROS -D_REENTRANT
LINTFLAGS += -y
+CERRWARN += -_gcc=-Wno-unused-variable
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libtnfctl/Makefile.com b/usr/src/lib/libtnfctl/Makefile.com
index 0f64791b28..569b7e92d7 100644
--- a/usr/src/lib/libtnfctl/Makefile.com
+++ b/usr/src/lib/libtnfctl/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libtnfctl.a
VERS= .1
@@ -78,6 +76,10 @@ CPPFLAGS += -I$(SRC)/lib/libtnfprobe -D_REENTRANT -I$(SRC)/cmd/sgs/include
LINTFLAGS += -y
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-empty-body
+CERRWARN += -_gcc=-Wno-parentheses
+
ASFLAGS += -P
$(ROOTHDRS) := FILEMODE = 644
diff --git a/usr/src/lib/libtnfprobe/Makefile.com b/usr/src/lib/libtnfprobe/Makefile.com
index d599d5fc7e..9dd31dd6f6 100644
--- a/usr/src/lib/libtnfprobe/Makefile.com
+++ b/usr/src/lib/libtnfprobe/Makefile.com
@@ -62,6 +62,10 @@ CPPFLAGS += -I.. -I$(UFSDIR) -D_REENTRANT -D_TNF_LIBRARY
LINTFLAGS += -y
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(ROOTHDRS) := FILEMODE = 644
LDLIBS += -lc
diff --git a/usr/src/lib/libtsnet/Makefile.com b/usr/src/lib/libtsnet/Makefile.com
index 5e73758b4e..4eb55a843f 100644
--- a/usr/src/lib/libtsnet/Makefile.com
+++ b/usr/src/lib/libtsnet/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libtsnet.a
VERS = .1
@@ -49,6 +47,7 @@ LDLIBS += -lsocket -lnsl -lc -lsecdb -ltsol
LIBTSOLINC = $(SRC)/lib/libtsol/common
CPPFLAGS += -D_REENTRANT -I$(LIBTSOLINC)
+CERRWARN += -_gcc=-Wno-uninitialized
.KEEP_STATE:
diff --git a/usr/src/lib/libtsol/Makefile.com b/usr/src/lib/libtsol/Makefile.com
index fb46ac31c6..f58f6f63ec 100644
--- a/usr/src/lib/libtsol/Makefile.com
+++ b/usr/src/lib/libtsol/Makefile.com
@@ -59,6 +59,8 @@ CPPFLAGS += -D_REENTRANT -I$(SRCDIR) -I$(COMMONDIR)
LINTFLAGS64 += -m64
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libumem/Makefile.com b/usr/src/lib/libumem/Makefile.com
index 1507bb78c3..9c10ded585 100644
--- a/usr/src/lib/libumem/Makefile.com
+++ b/usr/src/lib/libumem/Makefile.com
@@ -129,6 +129,9 @@ ASFLAGS_standalone = -DUMEM_STANDALONE
ASFLAGS_library =
ASFLAGS += -P $(ASFLAGS_$(CURTYPE)) -D_ASM
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(LINTLIB) := SRCS = ../common/$(LINTSRC)
# We want the thread-specific errno in the library, but we don't want it in
diff --git a/usr/src/lib/libunistat/Makefile.com b/usr/src/lib/libunistat/Makefile.com
index b737f5736b..522a938a4b 100644
--- a/usr/src/lib/libunistat/Makefile.com
+++ b/usr/src/lib/libunistat/Makefile.com
@@ -55,6 +55,9 @@ LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
LINTOUT= lint.out
LINTOUT_INTER= lintinter.out
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-variable
+
LINTSRC= $(LINTLIB:%.ln=%)
ROOTLINTDIR= $(ROOTLIBDIR)
ROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%)
@@ -90,10 +93,10 @@ DFLAGS = -DISSTATIC=static
# development (debug) - cstyle prohibits use of "STATIC"
DFLAGS = -g -DISSTATIC=" "
-CFLAGS += -v $(DFLAGS) -I. -DLIBSPCS_CLIENT\
+CFLAGS += $(CCVERBOSE) $(DFLAGS) -I. -DLIBSPCS_CLIENT\
-I$(JAVAINC) -I$(JAVAINCSOL)\
-DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\"
-CFLAGS64 += -v $(DFLAGS) -I. -DLIBSPCS_CLIENT\
+CFLAGS64 += $(CCVERBOSE) $(DFLAGS) -I. -DLIBSPCS_CLIENT\
-I$(JAVAINC) -I$(JAVAINCSOL)\
-DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\"
LDLIBS += -lc
diff --git a/usr/src/lib/libv12n/Makefile.com b/usr/src/lib/libv12n/Makefile.com
index 869beaf2d5..e8321c0a6b 100644
--- a/usr/src/lib/libv12n/Makefile.com
+++ b/usr/src/lib/libv12n/Makefile.com
@@ -39,6 +39,8 @@ SRCS = $(MACHCOBJS:%.o=../$(MACH)/%.c)
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(LINTLIB) := SRCS = ../common/llib-lv12n
.KEEP_STATE:
diff --git a/usr/src/lib/libvolmgt/Makefile.com b/usr/src/lib/libvolmgt/Makefile.com
index c91a0027a1..7b26a99461 100644
--- a/usr/src/lib/libvolmgt/Makefile.com
+++ b/usr/src/lib/libvolmgt/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libvolmgt.a
VERS=.1
@@ -44,6 +42,8 @@ LINTSRC= $(LINTLIB:%.ln=%)
CPPFLAGS = -I.. $(CPPFLAGS.master)
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-unused-variable
+
LDLIBS += -ladm -lc
.KEEP_STATE:
diff --git a/usr/src/lib/libwanboot/Makefile.com b/usr/src/lib/libwanboot/Makefile.com
index 5c1f561b35..54a5b54119 100644
--- a/usr/src/lib/libwanboot/Makefile.com
+++ b/usr/src/lib/libwanboot/Makefile.com
@@ -58,8 +58,12 @@ include ../../Makefile.lib
LIBS += $(LINTLIB)
LDLIBS += -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \
- -linetutil -lc -lcrypto -lssl
+ -linetutil -lc -lcrypto -lssl
CPPFLAGS = -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-uninitialized
# Must override SRCS from Makefile.lib since sources have
# multiple source directories.
diff --git a/usr/src/lib/libwanbootutil/Makefile.com b/usr/src/lib/libwanbootutil/Makefile.com
index 56b7a96871..29434247e6 100644
--- a/usr/src/lib/libwanbootutil/Makefile.com
+++ b/usr/src/lib/libwanbootutil/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = libwanbootutil.a
VERS = .1
@@ -66,6 +64,10 @@ LINTFLAGS += -erroff=E_FUNC_VAR_UNUSED
CPPFLAGS += -I$(CRYPTO_DIR)
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+
install: all
all: $(LIBS)
diff --git a/usr/src/lib/libwrap/Makefile.com b/usr/src/lib/libwrap/Makefile.com
index aeafc46ffe..f63bdd517f 100644
--- a/usr/src/lib/libwrap/Makefile.com
+++ b/usr/src/lib/libwrap/Makefile.com
@@ -48,10 +48,16 @@ CPPFLAGS += $(NETGROUP) $(TLI) $(ALWAYS_HOSTNAME) $(AUTH) \
$(STYLE) $(TABLES) $(DOT) $(BUGS) \
-DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
-I$(SRCDIR)
-CFLAGS += $(CCVERBOSE) -erroff=E_FUNC_EXPECTS_TO_RETURN_VALUE \
- -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT \
- -erroff=E_OLD_STYLE_DECL_HIDES_PROTO \
- -_gcc=-Wno-return-type
+CFLAGS += $(CCVERBOSE)
+
+CERRWARN += -erroff=E_FUNC_EXPECTS_TO_RETURN_VALUE
+CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
+CERRWARN += -erroff=E_OLD_STYLE_DECL_HIDES_PROTO
+
+CERRWARN += -_gcc=-Wno-return-type
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
.KEEP_STATE:
diff --git a/usr/src/lib/libxcurses/Makefile.com b/usr/src/lib/libxcurses/Makefile.com
index 65374166ef..15658cc686 100644
--- a/usr/src/lib/libxcurses/Makefile.com
+++ b/usr/src/lib/libxcurses/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libcurses.a
VERS= .1
@@ -115,6 +113,11 @@ ROOTLIBS= $(LIBS:%=$(ROOTLIBDIR)/%)
$(LINTLIB):= SRCS=../src/libc/llib-lcurses
$(LINTLIB):= CPPFLAGS += -D_XOPEN_SOURCE_EXTENDED
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-unused-function
+
LINTSRC= $(LINTLIB:%.ln=%)
LDLIBS += -lc
diff --git a/usr/src/lib/libxcurses2/Makefile.com b/usr/src/lib/libxcurses2/Makefile.com
index 022b180a59..c1629d2435 100644
--- a/usr/src/lib/libxcurses2/Makefile.com
+++ b/usr/src/lib/libxcurses2/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libcurses.a
VERS= .2
@@ -98,6 +96,8 @@ LINTSRC= $(LINTLIB:%.ln=%)
LDLIBS += -lc
CPPFLAGS = -I../h -I../src/libc/xcurses $(CPPFLAGS.master)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-value
#
# If and when somebody gets around to messaging this, CLOBBERFILE should not
diff --git a/usr/src/lib/libzdoor/Makefile.com b/usr/src/lib/libzdoor/Makefile.com
index 09bde0f1b4..139c1e117c 100644
--- a/usr/src/lib/libzdoor/Makefile.com
+++ b/usr/src/lib/libzdoor/Makefile.com
@@ -22,6 +22,10 @@
# Use is subject to license terms.
#
+LIBRARY = libpapi-common.a
+VERS = .0
+OBJECTS = attribute.o common.o library.o list.o misc.o status.o uri.o
+
LIBRARY= libzdoor.a
VERS= .1
OBJECTS= zdoor.o \
@@ -35,9 +39,16 @@ include ../../Makefile.rootfs
SRCDIR = ../common
SRCS = $(OBJECTS:%.o=$(SRCDIR)/%.c)
-CPPFLAGS += -I$(SRCDIR) -D_REENTRANT -D_FILE_OFFSET_BITS=64
-LIBS = $(DYNLIB) $(LINTLIB)
-LDLIBS += -lc -lzonecfg -lcontract
+LIBS = $(DYNLIB)
+
+$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
+
+CFLAGS += $(CCVERBOSE)
+CPPFLAGS += -I$(SRCDIR)
+
+CERRWARN += -_gcc=-Wno-switch
+
+MAPFILES = $(SRCDIR)/mapfile
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libzfs/Makefile.com b/usr/src/lib/libzfs/Makefile.com
index 67aa4f4695..e7d33f3a02 100644
--- a/usr/src/lib/libzfs/Makefile.com
+++ b/usr/src/lib/libzfs/Makefile.com
@@ -72,6 +72,11 @@ LDLIBS += -lc -lm -ldevid -lgen -lnvpair -luutil -lavl -lefi \
-ladm -lidmap -ltsol -lmd -lumem -lzfs_core
CPPFLAGS += $(INCS) -D_LARGEFILE64_SOURCE=1 -D_REENTRANT
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-function
+
SRCS= $(OBJS_COMMON:%.o=$(SRCDIR)/%.c) \
$(OBJS_SHARED:%.o=$(SRC)/common/zfs/%.c)
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libzfs/common/llib-lzfs b/usr/src/lib/libzfs/common/llib-lzfs
index bd026bcbbb..3552601183 100644
--- a/usr/src/lib/libzfs/common/llib-lzfs
+++ b/usr/src/lib/libzfs/common/llib-lzfs
@@ -20,13 +20,13 @@
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
* Use is subject to license terms.
*/
- /*
- * Copyright (c) 2012 by Delphix. All rights reserved.
- */
+/*
+ * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*LINTLIBRARY*/
/*PROTOLIB1*/
diff --git a/usr/src/lib/libzfs_jni/Makefile.com b/usr/src/lib/libzfs_jni/Makefile.com
index ac81f03073..e9781efe61 100644
--- a/usr/src/lib/libzfs_jni/Makefile.com
+++ b/usr/src/lib/libzfs_jni/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libzfs_jni.a
VERS= .1
@@ -46,6 +44,8 @@ INCS += -I$(JAVA_ROOT)/include \
LDLIBS += -lc -lnvpair -ldiskmgt -lzfs
CPPFLAGS += $(INCS)
$(NOT_RELEASE_BUILD) CPPFLAGS += -DDEBUG
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
SRCDIR = ../common
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libzonecfg/Makefile.com b/usr/src/lib/libzonecfg/Makefile.com
index 62565705ef..ce29f58a9b 100644
--- a/usr/src/lib/libzonecfg/Makefile.com
+++ b/usr/src/lib/libzonecfg/Makefile.com
@@ -36,6 +36,9 @@ $(DYNLIB) := LDLIBS += -lxml2
SRCDIR = ../common
CPPFLAGS += -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I$(SRCDIR) -D_REENTRANT
+CPPFLAGS += -I/usr/include/libxml2 -I$(SRCDIR) -D_REENTRANT
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
.KEEP_STATE:
diff --git a/usr/src/lib/libzonestat/Makefile.com b/usr/src/lib/libzonestat/Makefile.com
index 65ab999206..be23af3d93 100644
--- a/usr/src/lib/libzonestat/Makefile.com
+++ b/usr/src/lib/libzonestat/Makefile.com
@@ -35,6 +35,8 @@ SRCDIR = ../common
CPPFLAGS += -I../common -mt -D_POSIX_PTHREAD_SEMANTICS
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libzpool/Makefile.com b/usr/src/lib/libzpool/Makefile.com
index 2485f7350f..3fbcd02844 100644
--- a/usr/src/lib/libzpool/Makefile.com
+++ b/usr/src/lib/libzpool/Makefile.com
@@ -62,6 +62,15 @@ CFLAGS64 += -g $(CCVERBOSE) $(CNOGLOBAL)
LDLIBS += -lcmdutils -lumem -lavl -lnvpair -lz -lc -lsysevent -lmd
CPPFLAGS += $(INCS) -DDEBUG
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-empty-body
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-label
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/libzpool/common/kernel.c b/usr/src/lib/libzpool/common/kernel.c
index 04d530727f..c698c23ef6 100644
--- a/usr/src/lib/libzpool/common/kernel.c
+++ b/usr/src/lib/libzpool/common/kernel.c
@@ -46,6 +46,7 @@ int aok;
uint64_t physmem;
vnode_t *rootdir = (vnode_t *)0xabcd1234;
char hw_serial[HW_HOSTID_LEN];
+kmutex_t cpu_lock;
vmem_t *zio_arena = NULL;
struct utsname utsname = {
@@ -790,6 +791,26 @@ ddi_strtoull(const char *str, char **nptr, int base, u_longlong_t *result)
return (0);
}
+/* ARGSUSED */
+cyclic_id_t
+cyclic_add(cyc_handler_t *hdlr, cyc_time_t *when)
+{
+ return (1);
+}
+
+/* ARGSUSED */
+void
+cyclic_remove(cyclic_id_t id)
+{
+}
+
+/* ARGSUSED */
+int
+cyclic_reprogram(cyclic_id_t id, hrtime_t expiration)
+{
+ return (1);
+}
+
/*
* =========================================================================
* kernel emulation setup & teardown
@@ -823,6 +844,8 @@ kernel_init(int mode)
system_taskq_init();
+ mutex_init(&cpu_lock, NULL, MUTEX_DEFAULT, NULL);
+
spa_init(mode);
}
@@ -989,3 +1012,48 @@ zfs_onexit_cb_data(minor_t minor, uint64_t action_handle, void **data)
{
return (0);
}
+
+void
+bioinit(buf_t *bp)
+{
+ bzero(bp, sizeof (buf_t));
+}
+
+void
+biodone(buf_t *bp)
+{
+ if (bp->b_iodone != NULL) {
+ (*(bp->b_iodone))(bp);
+ return;
+ }
+ ASSERT((bp->b_flags & B_DONE) == 0);
+ bp->b_flags |= B_DONE;
+}
+
+void
+bioerror(buf_t *bp, int error)
+{
+ ASSERT(bp != NULL);
+ ASSERT(error >= 0);
+
+ if (error != 0) {
+ bp->b_flags |= B_ERROR;
+ } else {
+ bp->b_flags &= ~B_ERROR;
+ }
+ bp->b_error = error;
+}
+
+
+int
+geterror(struct buf *bp)
+{
+ int error = 0;
+
+ if (bp->b_flags & B_ERROR) {
+ error = bp->b_error;
+ if (!error)
+ error = EIO;
+ }
+ return (error);
+}
diff --git a/usr/src/lib/libzpool/common/sys/zfs_context.h b/usr/src/lib/libzpool/common/sys/zfs_context.h
index 9e6fd4455c..c638482d2e 100644
--- a/usr/src/lib/libzpool/common/sys/zfs_context.h
+++ b/usr/src/lib/libzpool/common/sys/zfs_context.h
@@ -453,6 +453,9 @@ extern vnode_t *rootdir;
extern void delay(clock_t ticks);
+#define SEC_TO_TICK(sec) ((sec) * hz)
+#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz))
+
#define gethrestime_sec() time(NULL)
#define gethrestime(t) \
do {\
@@ -572,6 +575,64 @@ void ksiddomain_rele(ksiddomain_t *);
#define ddi_log_sysevent(_a, _b, _c, _d, _e, _f, _g) \
sysevent_post_event(_c, _d, _b, "libzpool", _e, _f)
+/*
+ * Cyclic information
+ */
+extern kmutex_t cpu_lock;
+
+typedef uintptr_t cyclic_id_t;
+typedef uint16_t cyc_level_t;
+typedef void (*cyc_func_t)(void *);
+
+#define CY_LOW_LEVEL 0
+#define CY_INFINITY INT64_MAX
+#define CYCLIC_NONE ((cyclic_id_t)0)
+
+typedef struct cyc_time {
+ hrtime_t cyt_when;
+ hrtime_t cyt_interval;
+} cyc_time_t;
+
+typedef struct cyc_handler {
+ cyc_func_t cyh_func;
+ void *cyh_arg;
+ cyc_level_t cyh_level;
+} cyc_handler_t;
+
+extern cyclic_id_t cyclic_add(cyc_handler_t *, cyc_time_t *);
+extern void cyclic_remove(cyclic_id_t);
+extern int cyclic_reprogram(cyclic_id_t, hrtime_t);
+
+/*
+ * Buf structure
+ */
+#define B_BUSY 0x0001
+#define B_DONE 0x0002
+#define B_ERROR 0x0004
+#define B_READ 0x0040 /* read when I/O occurs */
+#define B_WRITE 0x0100 /* non-read pseudo-flag */
+
+typedef struct buf {
+ int b_flags;
+ size_t b_bcount;
+ union {
+ caddr_t b_addr;
+ } b_un;
+
+ lldaddr_t _b_blkno;
+#define b_lblkno _b_blkno._f
+ size_t b_resid;
+ size_t b_bufsize;
+ int (*b_iodone)(struct buf *);
+ int b_error;
+ void *b_private;
+} buf_t;
+
+extern void bioinit(buf_t *);
+extern void biodone(buf_t *);
+extern void bioerror(buf_t *, int);
+extern int geterror(buf_t *);
+
#ifdef __cplusplus
}
#endif
diff --git a/usr/src/lib/lvm/Makefile.lvm b/usr/src/lib/lvm/Makefile.lvm
index 99a4d94727..30b8d4c804 100644
--- a/usr/src/lib/lvm/Makefile.lvm
+++ b/usr/src/lib/lvm/Makefile.lvm
@@ -23,8 +23,6 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include $(SRC)/lib/Makefile.lib
@@ -37,3 +35,8 @@ ROOTDIRS = $(ROOT)/usr $(ROOTHDRDIR) $(ROOTLIBDIR)
RPCGENFLAGS = -C -M
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-label
diff --git a/usr/src/lib/madv/Makefile.com b/usr/src/lib/madv/Makefile.com
index 4304a8ed83..955c8287e1 100644
--- a/usr/src/lib/madv/Makefile.com
+++ b/usr/src/lib/madv/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = madv.a
VERS = .1
@@ -42,6 +40,9 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT
DYNFLAGS += $(ZNOVERSION) $(ZINTERPOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/mpapi/libmpapi/Makefile.com b/usr/src/lib/mpapi/libmpapi/Makefile.com
index dfff08bd39..892120bbf9 100644
--- a/usr/src/lib/mpapi/libmpapi/Makefile.com
+++ b/usr/src/lib/mpapi/libmpapi/Makefile.com
@@ -38,11 +38,15 @@ LDLIBS += -lc
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
CFLAGS += $(CCVERBOSE)
-CPPFLAGS += -I$(SRCDIR) -mt -v -D_POSIX_PTHREAD_SEMANTICS
+CPPFLAGS += -I$(SRCDIR) -mt $(CCVERBOSE) -D_POSIX_PTHREAD_SEMANTICS
CPPFLAGS += -DBUILD_TIME='"Wed Sep 24 12:00:00 2008"'
DYNFLAGS += -z finiarray=ExitLibrary
DYNFLAGS += -z initarray=InitLibrary
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+
ROOTETC = $(ROOT)/etc
CONFDIR = ../common
CONFFILE = $(CONFDIR)/mpapi.conf
diff --git a/usr/src/lib/mpss/Makefile.com b/usr/src/lib/mpss/Makefile.com
index 2b6d6fbd0a..6988a90742 100644
--- a/usr/src/lib/mpss/Makefile.com
+++ b/usr/src/lib/mpss/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = mpss.a
VERS = .1
@@ -42,6 +40,9 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT
DYNFLAGS += $(BLOCAL) $(ZNOVERSION)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/nsswitch/Makefile.com b/usr/src/lib/nsswitch/Makefile.com
index ea411ea488..9cbd34291b 100644
--- a/usr/src/lib/nsswitch/Makefile.com
+++ b/usr/src/lib/nsswitch/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include $(SRC)/lib/Makefile.lib
@@ -37,6 +35,12 @@ LINTOUT = lint.out
CPPFLAGS += -D_REENTRANT
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-address
+
LDLIBS += -lc
HSONAME =
diff --git a/usr/src/lib/nsswitch/ldap/common/getgrent.c b/usr/src/lib/nsswitch/ldap/common/getgrent.c
index bfcec21fbb..2682e6e2f8 100644
--- a/usr/src/lib/nsswitch/ldap/common/getgrent.c
+++ b/usr/src/lib/nsswitch/ldap/common/getgrent.c
@@ -25,6 +25,7 @@
#include <grp.h>
#include "ldap_common.h"
+#include <string.h>
/* String which may need to be removed from beginning of group password */
#define _CRYPT "{CRYPT}"
@@ -40,8 +41,21 @@
#define _F_GETGRNAM_SSD "(&(%%s)(cn=%s))"
#define _F_GETGRGID "(&(objectClass=posixGroup)(gidNumber=%u))"
#define _F_GETGRGID_SSD "(&(%%s)(gidNumber=%u))"
-#define _F_GETGRMEM "(&(objectClass=posixGroup)(memberUid=%s))"
-#define _F_GETGRMEM_SSD "(&(%%s)(memberUid=%s))"
+/*
+ * Group membership can be defined by either username or DN, so when searching
+ * for groups by member we need to consider both. The first parameter in the
+ * filter is replaced by username, the second by DN.
+ */
+#define _F_GETGRMEM \
+ "(&(objectClass=posixGroup)(|(memberUid=%s)(memberUid=%s)))"
+#define _F_GETGRMEM_SSD "(&(%%s)(|(memberUid=%s)(memberUid=%s)))"
+
+/*
+ * Copied from getpwnam.c, needed to look up user DN.
+ * Would it be better to move to ldap_common.h rather than duplicate?
+ */
+#define _F_GETPWNAM "(&(objectClass=posixAccount)(uid=%s))"
+#define _F_GETPWNAM_SSD "(&(%%s)(uid=%s))"
static const char *gr_attrs[] = {
_G_NAME,
@@ -75,6 +89,7 @@ _nss_ldap_group2str(ldap_backend_ptr be, nss_XbyY_args_t *argp)
char **gname, **passwd, **gid, *password, *end;
char gid_nobody[NOBODY_STR_LEN];
char *gid_nobody_v[1];
+ char *member_str, *strtok_state;
ns_ldap_attr_t *members;
(void) snprintf(gid_nobody, sizeof (gid_nobody), "%u", GID_NOBODY);
@@ -140,15 +155,34 @@ _nss_ldap_group2str(ldap_backend_ptr be, nss_XbyY_args_t *argp)
nss_result = NSS_STR_PARSE_PARSE;
goto result_grp2str;
}
- if (firstime) {
- len = snprintf(buffer, buflen, "%s",
- members->attrvalue[i]);
- TEST_AND_ADJUST(len, buffer, buflen, result_grp2str);
- firstime = 0;
+ /*
+ * If we find an '=' in the member attribute value, treat it as
+ * a DN, otherwise as a username.
+ */
+ if (member_str = strchr(members->attrvalue[i], '=')) {
+ member_str++; /* skip over the '=' */
+ /* Fail if we can't pull a username out of the RDN */
+ if (! (member_str = strtok_r(member_str,
+ ",", &strtok_state))) {
+ nss_result = NSS_STR_PARSE_PARSE;
+ goto result_grp2str;
+ }
} else {
- len = snprintf(buffer, buflen, ",%s",
- members->attrvalue[i]);
- TEST_AND_ADJUST(len, buffer, buflen, result_grp2str);
+ member_str = members->attrvalue[i];
+ }
+ if (*member_str != '\0') {
+ if (firstime) {
+ len = snprintf(buffer, buflen, "%s",
+ member_str);
+ TEST_AND_ADJUST(len, buffer, buflen,
+ result_grp2str);
+ firstime = 0;
+ } else {
+ len = snprintf(buffer, buflen, ",%s",
+ member_str);
+ TEST_AND_ADJUST(len, buffer, buflen,
+ result_grp2str);
+ }
}
}
nomember:
@@ -250,7 +284,8 @@ getbymember(ldap_backend_ptr be, void *a)
{
int i, j, k;
int gcnt = (int)0;
- char **groupvalue, **membervalue;
+ char **groupvalue, **membervalue, *member_str;
+ char *strtok_state;
nss_status_t lstat;
struct nss_groupsbymem *argp = (struct nss_groupsbymem *)a;
char searchfilter[SEARCHFILTERLEN];
@@ -258,7 +293,7 @@ getbymember(ldap_backend_ptr be, void *a)
char name[SEARCHFILTERLEN];
ns_ldap_result_t *result;
ns_ldap_entry_t *curEntry;
- char *username;
+ char *username, **dn_attr, *dn;
gid_t gid;
int ret;
@@ -269,14 +304,45 @@ getbymember(ldap_backend_ptr be, void *a)
if (_ldap_filter_name(name, argp->username, sizeof (name)) != 0)
return ((nss_status_t)NSS_NOTFOUND);
- ret = snprintf(searchfilter, sizeof (searchfilter), _F_GETGRMEM, name);
+ ret = snprintf(searchfilter, sizeof (searchfilter), _F_GETPWNAM, name);
+ if (ret >= sizeof (searchfilter) || ret < 0)
+ return ((nss_status_t)NSS_NOTFOUND);
+
+ ret = snprintf(userdata, sizeof (userdata), _F_GETPWNAM_SSD, name);
+ if (ret >= sizeof (userdata) || ret < 0)
+ return ((nss_status_t)NSS_NOTFOUND);
+
+ /*
+ * Look up the user DN in ldap. If it's not found, search solely by
+ * username.
+ */
+ lstat = (nss_status_t)_nss_ldap_nocb_lookup(be, NULL,
+ _PASSWD, searchfilter, NULL, _merge_SSD_filter, userdata);
+ if (lstat != (nss_status_t)NS_LDAP_SUCCESS)
+ return ((nss_status_t)lstat);
+
+ if (be->result == NULL ||
+ !(dn_attr = __ns_ldap_getAttr(be->result->entry, "dn")))
+ dn = name;
+ else
+ dn = dn_attr[0];
+
+ ret = snprintf(searchfilter, sizeof (searchfilter), _F_GETGRMEM, name,
+ dn);
if (ret >= sizeof (searchfilter) || ret < 0)
return ((nss_status_t)NSS_NOTFOUND);
- ret = snprintf(userdata, sizeof (userdata), _F_GETGRMEM_SSD, name);
+ ret = snprintf(userdata, sizeof (userdata), _F_GETGRMEM_SSD, name,
+ dn);
if (ret >= sizeof (userdata) || ret < 0)
return ((nss_status_t)NSS_NOTFOUND);
+ /*
+ * Free up resources from user DN search before performing group
+ * search.
+ */
+ (void) __ns_ldap_freeResult((ns_ldap_result_t **)&be->result);
+
gcnt = (int)argp->numgids;
lstat = (nss_status_t)_nss_ldap_nocb_lookup(be, NULL,
_GROUP, searchfilter, NULL, _merge_SSD_filter, userdata);
@@ -291,7 +357,20 @@ getbymember(ldap_backend_ptr be, void *a)
membervalue = __ns_ldap_getAttr(curEntry, "memberUid");
if (membervalue) {
for (j = 0; membervalue[j]; j++) {
- if (strcmp(membervalue[j], username) == NULL) {
+ /*
+ * If we find an '=' in the member attribute
+ * value, treat it as a DN, otherwise as a
+ * username.
+ */
+ if (member_str = strchr(membervalue[j], '=')) {
+ member_str++; /* skip over the '=' */
+ member_str = strtok_r(member_str, ",",
+ &strtok_state);
+ } else {
+ member_str = membervalue[j];
+ }
+ if (member_str &&
+ strcmp(member_str, username) == NULL) {
groupvalue = __ns_ldap_getAttr(curEntry,
"gidnumber");
gid = (gid_t)strtol(groupvalue[0],
diff --git a/usr/src/lib/pam_modules/authtok_check/Makefile.com b/usr/src/lib/pam_modules/authtok_check/Makefile.com
index 29b29c2372..79332c6e90 100644
--- a/usr/src/lib/pam_modules/authtok_check/Makefile.com
+++ b/usr/src/lib/pam_modules/authtok_check/Makefile.com
@@ -22,10 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# usr/src/lib/pam_modules/authtok_check/Makefile.com
-#
LIBRARY= pam_authtok_check.a
VERS= .1
@@ -37,6 +33,7 @@ include ../../Makefile.pam_modules
LDLIBS += -lpam -lc
CPPFLAGS += -D_FILE_OFFSET_BITS=64
+CERRWARN += -_gcc=-Wno-parentheses
all: $(LIBS)
diff --git a/usr/src/lib/pam_modules/dhkeys/Makefile.com b/usr/src/lib/pam_modules/dhkeys/Makefile.com
index f430c3285c..c5a0391025 100644
--- a/usr/src/lib/pam_modules/dhkeys/Makefile.com
+++ b/usr/src/lib/pam_modules/dhkeys/Makefile.com
@@ -25,7 +25,6 @@
#
# usr/src/lib/pam_modules/dhkeys/Makefile.com
#
-# ident "%Z%%M% %I% %E% SMI"
LIBRARY= pam_dhkeys.a
VERS= .1
@@ -36,6 +35,7 @@ include ../../Makefile.pam_modules
LDLIBS += -lpam -lnsl -lc
CPPFLAGS += -I$(SRC)/lib/libnsl/include
+CERRWARN += -_gcc=-Wno-parentheses
all: $(LIBS)
diff --git a/usr/src/lib/pam_modules/krb5/Makefile.com b/usr/src/lib/pam_modules/krb5/Makefile.com
index b4e93ccbfd..222f064fad 100644
--- a/usr/src/lib/pam_modules/krb5/Makefile.com
+++ b/usr/src/lib/pam_modules/krb5/Makefile.com
@@ -48,6 +48,9 @@ CPPFLAGS += -I../../../gss_mechs/mech_krb5/include \
-I$(SRC)/lib/krb5 \
-I.
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-function
+
# module needs to be unloadable because the key destructor might be
# called after dlclose()
DYNFLAGS += $(ZNODELETE)
diff --git a/usr/src/lib/pam_modules/krb5_migrate/Makefile.com b/usr/src/lib/pam_modules/krb5_migrate/Makefile.com
index 6871d9f713..498b00f83b 100644
--- a/usr/src/lib/pam_modules/krb5_migrate/Makefile.com
+++ b/usr/src/lib/pam_modules/krb5_migrate/Makefile.com
@@ -38,6 +38,9 @@ CPPFLAGS += -I../../../gss_mechs/mech_krb5/include \
-I$(SRC)/lib/gss_mechs/mech_krb5 \
-I$(SRC)/lib/krb5
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-function
+
LDLIBS += -lpam -lc
all: $(LIBS)
diff --git a/usr/src/lib/pam_modules/ldap/Makefile.com b/usr/src/lib/pam_modules/ldap/Makefile.com
index a0251f7355..8166a466b1 100644
--- a/usr/src/lib/pam_modules/ldap/Makefile.com
+++ b/usr/src/lib/pam_modules/ldap/Makefile.com
@@ -24,8 +24,6 @@
#
# usr/src/lib/pam_modules/ldap/Makefile.com
#
-#ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= pam_ldap.a
VERS= .1
@@ -42,6 +40,7 @@ include ../../Makefile.pam_modules
LDLIBS += -lpam -lsldap -lc
CPPFLAGS += -I$(SRC)/lib/libsldap/common
+CERRWARN += -_gcc=-Wno-parentheses
all: $(LIBS)
diff --git a/usr/src/lib/pam_modules/unix_account/Makefile.com b/usr/src/lib/pam_modules/unix_account/Makefile.com
index bc1af34425..9971e8b296 100644
--- a/usr/src/lib/pam_modules/unix_account/Makefile.com
+++ b/usr/src/lib/pam_modules/unix_account/Makefile.com
@@ -22,10 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# usr/src/lib/pam_modules/unix_account/Makefile.com
-#
LIBRARY= pam_unix_account.a
VERS= .1
@@ -36,6 +32,7 @@ include ../../Makefile.pam_modules
LDLIBS += -lpam -lc
# Enable large file support for reading the lastlog file.
CPPFLAGS += -D_FILE_OFFSET_BITS=64
+CERRWARN += -_gcc=-Wno-parentheses
all: $(LIBS)
diff --git a/usr/src/lib/pam_modules/unix_cred/Makefile.com b/usr/src/lib/pam_modules/unix_cred/Makefile.com
index b5de4963b7..45c444f9b2 100644
--- a/usr/src/lib/pam_modules/unix_cred/Makefile.com
+++ b/usr/src/lib/pam_modules/unix_cred/Makefile.com
@@ -22,10 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# usr/src/lib/pam_modules/unix_cred/Makefile.com
-#
LIBRARY= pam_unix_cred.a
VERS= .1
@@ -34,6 +30,8 @@ OBJECTS= unix_cred.o
include ../../Makefile.pam_modules
LDLIBS += -lbsm -lpam -lsecdb -lproject -lc
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
all: $(LIBS)
diff --git a/usr/src/lib/passwdutil/Makefile.com b/usr/src/lib/passwdutil/Makefile.com
index e1064ca799..0b7c1ec4c4 100644
--- a/usr/src/lib/passwdutil/Makefile.com
+++ b/usr/src/lib/passwdutil/Makefile.com
@@ -56,6 +56,10 @@ CPPFLAGS += -DENABLE_SUNOS_AGING -D_REENTRANT \
-I$(SRC)/lib/libsldap/common -I$(SRC)/lib/libnsl/include
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-switch
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-label
+
lint := SRCS= $(OBJ:%.o=$(SRCDIR)/%.c)
.KEEP_STATE:
diff --git a/usr/src/lib/pkcs11/libpkcs11/Makefile.com b/usr/src/lib/pkcs11/libpkcs11/Makefile.com
index bf99fa50df..33283e66e1 100644
--- a/usr/src/lib/pkcs11/libpkcs11/Makefile.com
+++ b/usr/src/lib/pkcs11/libpkcs11/Makefile.com
@@ -75,6 +75,9 @@ CPPFLAGS += -I$(INCDIR) -I$(SRCDIR) -D_REENTRANT
LINTFLAGS64 += -errchk=longptr64
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-uninitialized
+
.KEEP_STATE:
all: $(LIBS)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile
index b2e7d90ee7..e5062536aa 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile
+++ b/usr/src/lib/pkcs11/libsoftcrypto/amd64/Makefile
@@ -35,6 +35,10 @@ BIGNUM_PSM_OBJS = bignum_amd64.o bignum_amd64_asm.o
include $(SRC)/lib/Makefile.lib
include $(SRC)/lib/Makefile.lib.64
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
AES_PSM_SRC = $(AES_DIR)/$(MACH64)/aes_amd64.s \
$(AES_DIR)/$(MACH64)/aes_intel.s \
$(AES_DIR)/$(MACH64)/aeskey.c
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/intel/i386/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/intel/i386/Makefile
index 3d80d13627..87f618b38a 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/intel/i386/Makefile
+++ b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/intel/i386/Makefile
@@ -38,6 +38,8 @@ CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(CRYPTODIR) -I$(UTSDIR) -D_POSIX_PTHREAD_SEMANTICS
BIGNUM_FLAGS += -DMMX_MANAGE -DHWCAP -DPSR_MUL -DNO_BIG_ONE -DNO_BIG_TWO
+CERRWARN += -_gcc=-Wno-unused-variable
+
.KEEP_STATE:
all install: $(SYMCAP)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4u/Makefile.com b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4u/Makefile.com
index 6027025c55..1bb12a3b2f 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4u/Makefile.com
+++ b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4u/Makefile.com
@@ -41,6 +41,10 @@ include $(SRC)/lib/Makefile.lib
AS_CPPFLAGS += -D__STDC__ -D_ASM -DPIC -D_REENTRANT -D$(MACH)
ASFLAGS += $(AS_PICFLAGS) -P
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
CPPFLAGS += -D$(PLATFORM) -I$(CRYPTODIR) -I$(UTSDIR) \
-D_POSIX_PTHREAD_SEMANTICS
BIGNUM_FLAGS += -DUSE_FLOATING_POINT -DNO_BIG_ONE -DNO_BIG_TWO
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4v/Makefile.com b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4v/Makefile.com
index 48a72842a7..ad19150a23 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4v/Makefile.com
+++ b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/sun4v/Makefile.com
@@ -35,6 +35,10 @@ include $(SRC)/lib/Makefile.lib
AS_CPPFLAGS += -D__STDC__ -D_ASM -DPIC -D_REENTRANT -D$(MACH)
ASFLAGS += $(AS_PICFLAGS) -P
CFLAGS += $(CCVERBOSE) -xO5 -xbuiltin=%all -dalign
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
CPPFLAGS += -D$(PLATFORM) -I$(CRYPTODIR) -I$(UTSDIR) \
-D_POSIX_PTHREAD_SEMANTICS
BIGNUM_FLAGS += -DUMUL64 -DNO_BIG_ONE -DNO_BIG_TWO
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile
index 750bb15482..897a2da6cd 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile
+++ b/usr/src/lib/pkcs11/libsoftcrypto/i386/Makefile
@@ -30,6 +30,10 @@ include ../Makefile.com
include $(SRC)/lib/Makefile.lib
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
# Sources need to be redefined after Makefile.lib inclusion.
SRCS = $(AES_SRC) $(ARCFOUR_SRC) $(BIGNUM_SRC) $(BLOWFISH_SRC) \
$(DES_SRC) $(MODES_SRC) $(DH_SRC) $(DSA_SRC) $(RSA_SRC) \
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile
index a5442e51ab..deea108eac 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sparc/Makefile
@@ -41,6 +41,11 @@ LIBS = $(DYNLIB) $(LINTLIB)
MAPFILEDIR = ../common
CFLAGS += $(CCVERBOSE)
+
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
CPPFLAGS += -I$(CRYPTODIR) -I$(UTSDIR) -D_POSIX_PTHREAD_SEMANTICS
LDLIBS += -lcryptoutil -lc
LINTFLAGS += $(EXTRA_LINT_FLAGS)
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile b/usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile
index 0dc3a48308..8bde047675 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile
+++ b/usr/src/lib/pkcs11/libsoftcrypto/sparcv9/Makefile
@@ -42,6 +42,11 @@ LIBS = $(DYNLIB) $(LINTLIB)
MAPFILEDIR = ../common
CFLAGS += $(CCVERBOSE)
+
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
CPPFLAGS += -I$(CRYPTODIR) -I$(UTSDIR) -D_POSIX_PTHREAD_SEMANTICS
LDLIBS += -lcryptoutil -lc
LINTFLAGS64 += $(EXTRA_LINT_FLAGS)
diff --git a/usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com b/usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com
index 4e71cf6202..d71ccc01aa 100644
--- a/usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com
+++ b/usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= pkcs11_kernel.a
VERS= .1
@@ -86,6 +84,9 @@ LDLIBS += -lc -lcryptoutil -lmd
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-label
+
ROOTLIBDIR= $(ROOT)/usr/lib/security
ROOTLIBDIR64= $(ROOT)/usr/lib/security/$(MACH64)
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com b/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com
index dd6ad1a7c7..f50cbedabe 100644
--- a/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com
+++ b/usr/src/lib/pkcs11/pkcs11_softtoken/Makefile.com
@@ -125,6 +125,13 @@ LDLIBS += -lc -lmd -lcryptoutil -lsoftcrypto -lgen
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-empty-body
+
CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR) \
-I$(DHDIR) -I$(DSADIR) -I$(ECCDIR) -I$(SRC)/common/crypto \
-I$(MPIDIR) -I$(RSADIR) -I$(RNGDIR) \
diff --git a/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com b/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com
index 4a18468622..323f311dec 100644
--- a/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com
+++ b/usr/src/lib/pkcs11/pkcs11_tpm/Makefile.com
@@ -78,6 +78,10 @@ CPPFLAGS += -xCC -D_POSIX_PTHREAD_SEMANTICS $(TSSINC)
CPPFLAGS64 += $(CPPFLAGS)
C99MODE= $(C99_ENABLE)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-uninitialized
+
LINTSRC= $(OBJECTS:%.o=$(SRCDIR)/%.c)
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/policykit/Makefile.com b/usr/src/lib/policykit/Makefile.com
index 2dc67c1614..77f2328313 100644
--- a/usr/src/lib/policykit/Makefile.com
+++ b/usr/src/lib/policykit/Makefile.com
@@ -22,14 +22,14 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include $(SRC)/lib/Makefile.lib
include $(SRC)/lib/policykit/Makefile.policykit
CPPFLAGS = $(POLICYKIT_DBUS_CPPFLAGS) $(POLICYKIT_GLIB_CPPFLAGS) $(CPPFLAGS.master)
+CERRWARN += -_gcc=-Wno-unused-variable
+
C99MODE = $(C99_ENABLE)
ROOTLIBPCDIR = $(ROOT)/usr/lib/pkgconfig
diff --git a/usr/src/lib/pysolaris/Makefile.com b/usr/src/lib/pysolaris/Makefile.com
index 0dbd77826e..0e5b385bd8 100644
--- a/usr/src/lib/pysolaris/Makefile.com
+++ b/usr/src/lib/pysolaris/Makefile.com
@@ -45,6 +45,8 @@ LIBS = $(DYNLIB)
LDLIBS += -lc -lsec -lidmap -lpython2.6
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(ADJUNCT_PROTO)/usr/include/python2.6
+CERRWARN += -_gcc=-Wno-unused-variable
+CPPFLAGS += -I/usr/include/python2.6
.KEEP_STATE:
diff --git a/usr/src/lib/pyzfs/Makefile.com b/usr/src/lib/pyzfs/Makefile.com
index 20e1c59171..a565ed8059 100644
--- a/usr/src/lib/pyzfs/Makefile.com
+++ b/usr/src/lib/pyzfs/Makefile.com
@@ -48,6 +48,8 @@ LIBS = $(DYNLIB)
LDLIBS += -lc -lnvpair -lpython2.6 -lzfs
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(ADJUNCT_PROTO)/usr/include/python2.6
+CERRWARN += -_gcc=-Wno-unused-variable
+CPPFLAGS += -I/usr/include/python2.6
CPPFLAGS += -I../../../uts/common/fs/zfs
CPPFLAGS += -I../../../common/zfs
diff --git a/usr/src/lib/rpcsec_gss/Makefile.com b/usr/src/lib/rpcsec_gss/Makefile.com
index 7908550600..53287d4664 100644
--- a/usr/src/lib/rpcsec_gss/Makefile.com
+++ b/usr/src/lib/rpcsec_gss/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= rpcsec.a
VERS = .1
@@ -35,10 +33,13 @@ include ../../Makefile.lib
CPPFLAGS += -D_REENTRANT -I$(SRC)/uts/common/gssapi/include \
-I$(SRC)/uts/common
-
+
CFLAGS += $(XFFLAG)
CFLAGS64 += $(XFFLAG)
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-parentheses
+
DYNFLAGS += $(ZIGNORE)
LINTSRC= $(LINTLIB:%.ln=%)
diff --git a/usr/src/lib/sasl_plugins/Makefile.com b/usr/src/lib/sasl_plugins/Makefile.com
index 231d20fdca..043c3eb01c 100644
--- a/usr/src/lib/sasl_plugins/Makefile.com
+++ b/usr/src/lib/sasl_plugins/Makefile.com
@@ -30,6 +30,8 @@ include $(SRC)/lib/Makefile.lib
CPPFLAGS += -I$(SRC)/lib/libsasl/include
+CERRWARN += -_gcc=-Wno-uninitialized
+
LIBS = $(DYNLIB)
SRCS= $(PLUG_OBJS:%.o=../%.c) \
$(COMMONOBJS:%.o=$(SRC)/lib/libsasl/plugin/%.c)
diff --git a/usr/src/lib/scsi/libscsi/Makefile.com b/usr/src/lib/scsi/libscsi/Makefile.com
index 88e3f7fa4c..c9dafcb29b 100644
--- a/usr/src/lib/scsi/libscsi/Makefile.com
+++ b/usr/src/lib/scsi/libscsi/Makefile.com
@@ -23,7 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
LIBRARY = libscsi.a
VERS = .1
@@ -42,6 +41,9 @@ C99MODE = $(C99_ENABLE)
CPPFLAGS += -I../common -I. -D_REENTRANT
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CFLAGS += $(CCVERBOSE)
+
+CERRWARN += -_gcc=-Wno-type-limits
+
LDLIBS += \
-lumem \
-lc
diff --git a/usr/src/lib/scsi/libses/Makefile.defs b/usr/src/lib/scsi/libses/Makefile.defs
index c4772bd68f..e3615d0665 100644
--- a/usr/src/lib/scsi/libses/Makefile.defs
+++ b/usr/src/lib/scsi/libses/Makefile.defs
@@ -29,6 +29,10 @@ CPPFLAGS += -I../common -I. -D_REENTRANT
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CFLAGS += $(CCVERBOSE)
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-label
+
ROOTLIBDIR = $(ROOTSCSILIBDIR)
ROOTLIBDIR64 = $(ROOTSCSILIBDIR)/$(MACH64)
@@ -49,11 +53,4 @@ LIBS = $(DYNLIB) $(LINTLIB)
CLEANFILES += \
../common/ses_errno.c
-#
-# On SPARC, gcc 3.4 emits DWARF assembler directives for TLS data that are not
-# understood by the Sun assembler. Until this problem is fixed, we turn down
-# the amount of generated debugging information, which seems to do the trick.
-#
-$(__GNUC3)$(SPARC_BLD)CTF_FLAGS += -_gcc=-g1
-
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/scsi/libsmp/Makefile.com b/usr/src/lib/scsi/libsmp/Makefile.com
index 4316313877..95b666e4fb 100644
--- a/usr/src/lib/scsi/libsmp/Makefile.com
+++ b/usr/src/lib/scsi/libsmp/Makefile.com
@@ -40,6 +40,10 @@ C99MODE = $(C99_ENABLE)
CPPFLAGS += -I../common -I. -D_REENTRANT
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CFLAGS += $(CCVERBOSE)
+
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-uninitialized
+
LDLIBS += \
-lumem \
-lc
@@ -50,13 +54,6 @@ ROOTLIBDIR64 = $(ROOTSCSILIBDIR)/$(MACH64)
CLEANFILES += \
../common/smp_errno.c
-#
-# On SPARC, gcc 3.4 emits DWARF assembler directives for TLS data that are not
-# understood by the Sun assembler. Until this problem is fixed, we turn down
-# the amount of generated debugging information, which seems to do the trick.
-#
-$(__GNUC3)$(SPARC_BLD)CTF_FLAGS += -_gcc=-g1
-
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
.KEEP_STATE:
diff --git a/usr/src/lib/scsi/plugins/ses/SUN-Storage-J4400/Makefile.com b/usr/src/lib/scsi/plugins/ses/SUN-Storage-J4400/Makefile.com
index d54d99a89e..1d55f54d69 100644
--- a/usr/src/lib/scsi/plugins/ses/SUN-Storage-J4400/Makefile.com
+++ b/usr/src/lib/scsi/plugins/ses/SUN-Storage-J4400/Makefile.com
@@ -23,7 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = SUN-Storage-J4400
SRCS = riverwalk.c
@@ -32,3 +31,5 @@ PLUGINTYPE = vendor
ALIASES = SUN-Storage-J4200
include ../../Makefile.lib
+
+CERRWARN += -_gcc=-Wno-switch
diff --git a/usr/src/lib/scsi/plugins/ses/ses2/Makefile.com b/usr/src/lib/scsi/plugins/ses/ses2/Makefile.com
index 2f020ac65a..2526c79447 100644
--- a/usr/src/lib/scsi/plugins/ses/ses2/Makefile.com
+++ b/usr/src/lib/scsi/plugins/ses/ses2/Makefile.com
@@ -23,7 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
MODULE = ses2
SRCS = ses2.c \
@@ -37,3 +36,5 @@ SRCDIR = ../common
PLUGINTYPE = framework
include ../../Makefile.lib
+
+CERRWARN += -_gcc=-Wno-switch
diff --git a/usr/src/lib/scsi/plugins/smp/sas2/Makefile.com b/usr/src/lib/scsi/plugins/smp/sas2/Makefile.com
index 6c6f48fba0..85c6559089 100644
--- a/usr/src/lib/scsi/plugins/smp/sas2/Makefile.com
+++ b/usr/src/lib/scsi/plugins/smp/sas2/Makefile.com
@@ -31,3 +31,5 @@ SRCDIR = ../common
PLUGINTYPE = framework
include ../../Makefile.lib
+
+CERRWARN += -_gcc=-Wno-unused-variable
diff --git a/usr/src/lib/smbsrv/libmlsvc/Makefile.com b/usr/src/lib/smbsrv/libmlsvc/Makefile.com
index be2472157f..f00731b1c0 100644
--- a/usr/src/lib/smbsrv/libmlsvc/Makefile.com
+++ b/usr/src/lib/smbsrv/libmlsvc/Makefile.com
@@ -89,6 +89,9 @@ LDLIBS += -lmlrpc -lsmb -lsmbns -lshare -lsmbfs -lresolv -lnsl -lpkcs11 \
CPPFLAGS += $(INCS) -D_REENTRANT
$(ENABLE_SMB_PRINTING) CPPFLAGS += -DHAVE_CUPS
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-uninitialized
+
SRCS= $(OBJS_COMMON:%.o=$(SRCDIR)/%.c)
include ../../Makefile.targ
diff --git a/usr/src/lib/smbsrv/libsmb/Makefile.com b/usr/src/lib/smbsrv/libsmb/Makefile.com
index f916b6a4db..4b86caeb95 100644
--- a/usr/src/lib/smbsrv/libsmb/Makefile.com
+++ b/usr/src/lib/smbsrv/libsmb/Makefile.com
@@ -77,6 +77,9 @@ LDLIBS += $(MACH_LDLIBS)
LDLIBS += -lscf -lmd -luuid -lnsl -lpkcs11 -lsec -lsocket -lresolv
LDLIBS += -lidmap -lreparse -lnvpair -lcmdutils -lavl -lc
CPPFLAGS += $(INCS) -D_REENTRANT
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-switch
SRCS= $(OBJS_COMMON:%.o=$(SRCDIR)/%.c) \
$(OBJS_SHARED:%.o=$(SRC)/common/smbsrv/%.c)
diff --git a/usr/src/lib/smbsrv/libsmb/common/mapfile-vers b/usr/src/lib/smbsrv/libsmb/common/mapfile-vers
index acb7df1a7b..7b7f222d2d 100644
--- a/usr/src/lib/smbsrv/libsmb/common/mapfile-vers
+++ b/usr/src/lib/smbsrv/libsmb/common/mapfile-vers
@@ -19,7 +19,7 @@
#
#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+# Copyright 2012 Nexenta Systems, Inc. All rights reserved.
#
#
@@ -269,7 +269,6 @@ SYMBOL_VERSION SUNWprivate {
smb_mac_init;
smb_mac_sign;
smb_match;
- smb_match_ci;
smb_match_netlogon_seqnum;
smb_mbstos;
smb_mbstowcs;
diff --git a/usr/src/lib/smbsrv/libsmbns/Makefile.com b/usr/src/lib/smbsrv/libsmbns/Makefile.com
index 7ab36a6127..840d6392c6 100644
--- a/usr/src/lib/smbsrv/libsmbns/Makefile.com
+++ b/usr/src/lib/smbsrv/libsmbns/Makefile.com
@@ -51,6 +51,8 @@ LDLIBS += $(MACH_LDLIBS)
LDLIBS += -lsmb -lgss -lcmdutils -lldap -lresolv -lnsl -lsocket
LDLIBS += -lc -lcryptoutil
CPPFLAGS += -D_REENTRANT
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-uninitialized
# DYNLIB libraries do not have lint libs and are not linted
$(DYNLIB) := LDLIBS += -lkrb5
diff --git a/usr/src/lib/smhba/Makefile.com b/usr/src/lib/smhba/Makefile.com
index a19413dc27..61a498eaeb 100644
--- a/usr/src/lib/smhba/Makefile.com
+++ b/usr/src/lib/smhba/Makefile.com
@@ -45,6 +45,10 @@ CFLAGS += -DUSESYSLOG
CPPFLAGS += $(INCS)
CPPFLAGS += -DPOSIX_THREADS
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-unused-function
+
LDLIBS += -lc
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/smhba/common/SMHBAAPILIB.c b/usr/src/lib/smhba/common/SMHBAAPILIB.c
index ae2fd4b0d8..e6471b6b19 100644
--- a/usr/src/lib/smhba/common/SMHBAAPILIB.c
+++ b/usr/src/lib/smhba/common/SMHBAAPILIB.c
@@ -1403,7 +1403,7 @@ HBA_GetAdapterName(
HBA_STATUS ret = HBA_STATUS_ERROR_ILLEGAL_INDEX;
if (adaptername == NULL) {
- DEBUG(1, "HBA_GetAdapterName: NULL pointer adatpername",
+ DEBUG(1, "HBA_GetAdapterName: NULL pointer adaptername",
0, 0, 0);
return (HBA_STATUS_ERROR_ARG);
}
@@ -1451,7 +1451,7 @@ HBA_OpenAdapter(char *adaptername)
return (handle);
}
if (adaptername == NULL) {
- DEBUG(1, "HBA_OpenAdapter: NULL pointer adatpername",
+ DEBUG(1, "HBA_OpenAdapter: NULL pointer adaptername",
0, 0, 0);
return (handle);
}
@@ -4329,7 +4329,7 @@ SMHBA_SendSMPPassThru(
* Following the similar logic of HBAAPI addaspterevents_callback.
*
* Unlike other events Adapter Add Event is not limited to a specific
- * adpater(i.e. no adatper handle is passed for registration) so
+ * adapter(i.e. no adapter handle is passed for registration) so
* the event should be passed to all registrants. The routine below
* is passed to the VSLs as a callback and when Adapter Add event is detected
* by VSL it will call smhba_adapteraddevents_callback() which in turn check
diff --git a/usr/src/lib/storage/liba5k/Makefile.com b/usr/src/lib/storage/liba5k/Makefile.com
index f90deb93ae..202c11bdfd 100644
--- a/usr/src/lib/storage/liba5k/Makefile.com
+++ b/usr/src/lib/storage/liba5k/Makefile.com
@@ -44,6 +44,9 @@ COMMON_LINTFLAGS += -erroff=E_SEC_PRINTF_VAR_FMT
LINTFLAGS += $(COMMON_LINTFLAGS)
LINTFLAGS64 += $(COMMON_LINTFLAGS)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
LDLIBS += -lc -ldevice -lg_fc
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/storage/libg_fc/Makefile.com b/usr/src/lib/storage/libg_fc/Makefile.com
index c953ece3e8..2b8c54f021 100644
--- a/usr/src/lib/storage/libg_fc/Makefile.com
+++ b/usr/src/lib/storage/libg_fc/Makefile.com
@@ -49,6 +49,9 @@ COMMON_LINTFLAGS += -erroff=E_SEC_PRINTF_VAR_FMT
LINTFLAGS += $(COMMON_LINTFLAGS)
LINTFLAGS64 += $(COMMON_LINTFLAGS)
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
.KEEP_STATE:
diff --git a/usr/src/lib/sun_fc/common/FCHBA.cc b/usr/src/lib/sun_fc/common/FCHBA.cc
index 5aba01e338..1c7c26acac 100644
--- a/usr/src/lib/sun_fc/common/FCHBA.cc
+++ b/usr/src/lib/sun_fc/common/FCHBA.cc
@@ -447,7 +447,7 @@ void FCHBA::loadAdapters(vector<HBA*> &list) {
if (pathList->numAdapters > HBAList::HBA_MAX_PER_LIST) {
delete(pathList);
throw InternalError(
- "Exceeds max number of adatpers that VSL supports.");
+ "Exceeds max number of adapters that VSL supports.");
}
delete (pathList);
}
diff --git a/usr/src/lib/sun_fc/common/TgtFCHBA.cc b/usr/src/lib/sun_fc/common/TgtFCHBA.cc
index 7d162b2dbd..8c3274f2d5 100644
--- a/usr/src/lib/sun_fc/common/TgtFCHBA.cc
+++ b/usr/src/lib/sun_fc/common/TgtFCHBA.cc
@@ -330,7 +330,7 @@ void TgtFCHBA::loadAdapters(vector<HBA*> &list)
if (tgthbaList->numPorts > HBAList::HBA_MAX_PER_LIST) {
delete(tgthbaList);
throw InternalError(
- "Exceeds max number of adatpers that VSL supports.");
+ "Exceeds max number of adapters that VSL supports.");
}
delete (tgthbaList);
}
diff --git a/usr/src/lib/sun_sas/Makefile.com b/usr/src/lib/sun_sas/Makefile.com
index d3ddf2f450..f6457c7c8e 100644
--- a/usr/src/lib/sun_sas/Makefile.com
+++ b/usr/src/lib/sun_sas/Makefile.com
@@ -75,12 +75,15 @@ INCS += -I$(SRC)/lib/hbaapi/common
INCS += -I$(SRC)/lib/libdevid
CFLAGS += -mt
-CFLAGS += -v
+CFLAGS += $(CCVERBOSE)
CFLAGS64 += -mt
-CFLAGS64 += -v
+CFLAGS64 += $(CCVERBOSE)
CPPFLAGS += $(INCS) -D_POSIX_PTHREAD_SEMANTICS
CPPFLAGS += -DBUILD_TIME='"Wed Feb 4 12:00:00 2009"'
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-value
+
LDLIBS += -ldevinfo
LDLIBS += -lsysevent
LDLIBS += -lnvpair
diff --git a/usr/src/lib/sun_sas/common/sun_sas.c b/usr/src/lib/sun_sas/common/sun_sas.c
index 152a25a723..3211a5924f 100644
--- a/usr/src/lib/sun_sas/common/sun_sas.c
+++ b/usr/src/lib/sun_sas/common/sun_sas.c
@@ -133,7 +133,7 @@ RetrieveOpenHandle(HBA_HANDLE handle)
struct open_handle *open_handle_ptr = NULL;
if (global_hba_head == NULL) {
- log(LOG_DEBUG, ROUTINE, "No adpater is found.");
+ log(LOG_DEBUG, ROUTINE, "No adapter is found.");
return (NULL);
}
diff --git a/usr/src/lib/udapl/libdat/Makefile.com b/usr/src/lib/udapl/libdat/Makefile.com
index 22d7dc9e00..254241680d 100644
--- a/usr/src/lib/udapl/libdat/Makefile.com
+++ b/usr/src/lib/udapl/libdat/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY= libdat.a
VERS= .1
@@ -53,6 +51,8 @@ LINTFLAGS += -DDEBUG
LINTFLAGS64 += -DDEBUG
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
+CERRWARN += -_gcc=-Wno-type-limits
+
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
debug := COPTFLAG = -g
debug := COPTFLAG64 = -g
diff --git a/usr/src/lib/udapl/udapl_tavor/Makefile.com b/usr/src/lib/udapl/udapl_tavor/Makefile.com
index b23927eaa1..75780c71be 100644
--- a/usr/src/lib/udapl/udapl_tavor/Makefile.com
+++ b/usr/src/lib/udapl/udapl_tavor/Makefile.com
@@ -148,6 +148,10 @@ CFLAGS += $(CCVERBOSE)
LINTFLAGS += -DDAPL_DBG
LINTFLAGS64 += -DDAPL_DBG
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+CERRWARN += -_gcc=-Wno-switch
+
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDAPL_DBG
debug := COPTFLAG = -g
debug := COPTFLAG64 = -g
diff --git a/usr/src/lib/watchmalloc/Makefile.com b/usr/src/lib/watchmalloc/Makefile.com
index 58f9e072aa..eabd4993bc 100644
--- a/usr/src/lib/watchmalloc/Makefile.com
+++ b/usr/src/lib/watchmalloc/Makefile.com
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
LIBRARY = watchmalloc.a
VERS = .1
@@ -42,6 +40,8 @@ CFLAGS64 += $(CCVERBOSE)
CPPFLAGS += -I../common -I../../common/inc -D_REENTRANT
DYNFLAGS += $(ZINTERPOSE)
+CERRWARN += -_gcc=-Wno-unused-label
+
.KEEP_STATE:
all: $(LIBS)