Browse Source

Resolves: #339031
Summary: Solaris: warnings reported by the Solaris compiler

Noriko Hosoi 18 years ago
parent
commit
eb75ae358f

+ 3 - 0
config.h.in

@@ -272,6 +272,9 @@
 /* Linux */
 #undef Linux
 
+/* no getdomainname */
+#undef NO_DOMAINNAME
+
 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
 #undef NO_MINUS_C_MINUS_O
 

+ 5 - 0
configure

@@ -23360,6 +23360,11 @@ cat >>confdefs.h <<\_ACEOF
 #define _REENTRANT 1
 _ACEOF
 
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DOMAINNAME 1
+_ACEOF
+
     LIBSOCKET=-lsocket
     LIBSOCKET=$LIBSOCKET
 

+ 1 - 0
configure.ac

@@ -310,6 +310,7 @@ case $host in
     AC_DEFINE([sunos5], [1], [SunOS5])
     AC_DEFINE([OSVERSION], [509], [OS version])
     AC_DEFINE([_REENTRANT], [1], [_REENTRANT])
+    AC_DEFINE([NO_DOMAINNAME], [1], [no getdomainname])
 dnl socket nsl and dl are required to link several programs and libdb
     LIBSOCKET=-lsocket
     AC_SUBST([LIBSOCKET], [$LIBSOCKET])

+ 3 - 2
ldap/servers/plugins/replication/cl5_api.c

@@ -43,6 +43,7 @@
 
 /* cl5_api.c - implementation of 5.0 style changelog API */
 
+#include <unistd.h>
 #include <errno.h>
 #include <sys/stat.h>
 #if defined( OS_solaris ) || defined( hpux )
@@ -6451,8 +6452,8 @@ static void _cl5DBCloseFile (void **data)
             if (rc != 0)
 	    {
                 slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: "
-                    "failed to remove (%s) file; libdb error - %d (%s)\n", file->name,
-                    rc, dblayer_strerror(rc));
+                    "failed to remove (%s) file; libdb error - %d (%s)\n", 
+					fullpathname, rc, db_strerror(rc));
             }
         }
 

+ 1 - 1
ldap/servers/plugins/replication/windows_protocol_util.c

@@ -2256,7 +2256,7 @@ map_windows_tombstone_dn(Slapi_Entry *e, Slapi_DN **dn, Private_Repl_Protocol *p
 	 * to trim the DN to only dc components. */
 	if (suffix = slapi_sdn_get_dn(windows_private_get_windows_subtree(prp->agmt))) {
 		/* If this isn't found, it is treated as an error below. */
-		suffix = (const char *) strcasestr(suffix,"dc=");
+		suffix = (const char *) PL_strcasestr(suffix,"dc=");
 	}
 
 	if (cn && guid && suffix) {

+ 2 - 0
ldap/servers/slapd/back-ldbm/back-ldbm.h

@@ -54,8 +54,10 @@
 
 /* needed by at least HPUX and Solaris, to define off64_t */
 #ifdef DB_USE_64LFS
+#if !defined(_LARGEFILE64_SOURCE)
 #define _LARGEFILE64_SOURCE
 #endif
+#endif
 
 /* A bunch of random system headers taken from all the source files, no source file should #include
    any system headers now */

+ 1 - 1
ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c

@@ -588,7 +588,7 @@ attrcrypt_crypto_op(attrcrypt_private *priv, backend *be, struct attrinfo *ai, c
 	output_buffer_length = in_size + 16;
 	output_buffer = (unsigned char *)slapi_ch_malloc(output_buffer_length);
 	/* Now call NSS to do the cipher op */
-	iv_item.data = "aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */
+	iv_item.data = (unsigned char *)"aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */
 	iv_item.len = acs->ace->iv_length; /* length of the array of IV bytes */
 	security_parameter = slapd_pk11_ParamFromIV(acs->ace->cipher_mechanism, &iv_item);
 	if (NULL == security_parameter) {