From c0aea2e4c9a3af8c047ec03ef0d6edacec498672 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Mon, 22 Jul 2013 18:16:51 +0200
Subject: [PATCH 1/4] Fix compilation warnings.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

https://fedorahosted.org/389/ticket/47440

Reviewed by: ?
---
 include/base/ereport.h        |  4 ++--
 include/base/file.h           |  2 +-
 include/i18n.h                |  6 +++---
 include/libaccess/acl.h       |  4 ++--
 include/libaccess/aclerror.h  |  2 +-
 include/libaccess/aclproto.h  |  4 ++--
 include/libaccess/las.h       |  2 +-
 include/libaccess/nsautherr.h |  2 +-
 include/libaccess/nserror.h   |  2 +-
 include/libaccess/symbols.h   |  4 ++--
 include/public/nsacl/aclapi.h |  9 +++++----
 include/public/nsacl/acldef.h |  2 +-
 lib/base/file.cpp             |  4 ++--
 lib/base/util.cpp             | 10 +++++-----
 lib/ldaputil/cert.c           |  2 +-
 lib/libaccess/acl.tab.cpp     |  2 +-
 lib/libaccess/aclerror.cpp    |  4 ++--
 lib/libaccess/acleval.cpp     |  4 ++--
 lib/libaccess/aclspace.cpp    |  4 ++--
 lib/libaccess/acltext.y       |  2 +-
 lib/libaccess/acltools.cpp    | 10 +++++-----
 lib/libaccess/lasip.cpp       |  8 ++++----
 lib/libaccess/nsautherr.cpp   | 12 ++++++------
 lib/libaccess/oneeval.cpp     | 12 ++++++------
 lib/libaccess/symbols.cpp     |  4 ++--
 lib/libadmin/error.c          |  2 +-
 lib/libsi18n/getstrprop.c     | 12 ++++++------
 27 files changed, 68 insertions(+), 67 deletions(-)

diff --git a/include/base/ereport.h b/include/base/ereport.h
index e97be14ed8c7e56b26537119d7290017a3f3ecbb..40813ea2833b7fb8024330a4f14bd184fe000848 100644
--- a/include/base/ereport.h
+++ b/include/base/ereport.h
@@ -65,13 +65,13 @@ NSPR_BEGIN_EXTERN_C
  * the current date.
  */
 
-NSAPI_PUBLIC int INTereport(int degree, char *fmt, ...)
+NSAPI_PUBLIC int INTereport(int degree, const char *fmt, ...)
 #ifdef __GNUC__ 
         __attribute__ ((format (printf, 2, 3)));
 #else
         ;
 #endif
-NSAPI_PUBLIC int INTereport_v(int degree, char *fmt, va_list args);
+NSAPI_PUBLIC int INTereport_v(int degree, const char *fmt, va_list args);
 
 NSPR_END_EXTERN_C
 
diff --git a/include/base/file.h b/include/base/file.h
index fa53eb5efd77d9ee63729526382741da4508080f..6ad9fc70f928616311742426edd1f4ea1066ebce 100644
--- a/include/base/file.h
+++ b/include/base/file.h
@@ -103,7 +103,7 @@ NSAPI_PUBLIC void INTfile_unix2local(char *path, char *p2);
 NSAPI_PUBLIC int INTsystem_nocoredumps(void);
 NSAPI_PUBLIC int INTfile_setinherit(SYS_FILE fd, int value);
 NSAPI_PUBLIC int INTfile_notfound(void);
-NSAPI_PUBLIC char *INTsystem_errmsg(void);
+NSAPI_PUBLIC const char *INTsystem_errmsg(void);
 NSAPI_PUBLIC int INTsystem_errmsg_fn(char **buff, size_t maxlen);
 
 NSPR_END_EXTERN_C
diff --git a/include/i18n.h b/include/i18n.h
index 2d53b20d6b90c3b9bbb860b1f902b2823eb7f601..d73e60465ec9e431a581fe7b23a779d5054dc56f 100644
--- a/include/i18n.h
+++ b/include/i18n.h
@@ -172,9 +172,9 @@ extern "C"
 /******************************/
 
 NSAPI_PUBLIC
-extern char*
-XP_GetStringFromDatabase(char* strLibraryName,
-                         char* strLanguage,
+extern const char*
+XP_GetStringFromDatabase(const char* strLibraryName,
+                         const char* strLanguage,
                          int iToken);
 
 #ifdef __cplusplus
diff --git a/include/libaccess/acl.h b/include/libaccess/acl.h
index c3f61eaae581f032f63766f9f60b5c1daef5a589..824293515eb6e0eeeb29d561d95967fcd25584f9 100644
--- a/include/libaccess/acl.h
+++ b/include/libaccess/acl.h
@@ -67,8 +67,8 @@
 
 NSPR_BEGIN_EXTERN_C
 
-extern	char	*generic_rights[];
-extern	char	*http_generic[];
+extern	const char	*generic_rights[];
+extern	const char	*http_generic[];
 
 NSPR_END_EXTERN_C
 
diff --git a/include/libaccess/aclerror.h b/include/libaccess/aclerror.h
index b8214b37270d116a6e303e84cd3344215d72299f..3aff2c717705b027da282b18e5bb82a5570b5e9a 100644
--- a/include/libaccess/aclerror.h
+++ b/include/libaccess/aclerror.h
@@ -45,7 +45,7 @@
 
 /* ACL facility name string (in aclbuild.c) */
 NSPR_BEGIN_EXTERN_C
-extern char * ACL_Program;
+extern const char * ACL_Program;
 NSPR_END_EXTERN_C
 
 /* Define error identifiers */
diff --git a/include/libaccess/aclproto.h b/include/libaccess/aclproto.h
index fe6545c86cf72e5e2e9925d3b0ae9142d62d467d..4579e8daf578cde126ecddda82f037e28c7553bd 100644
--- a/include/libaccess/aclproto.h
+++ b/include/libaccess/aclproto.h
@@ -67,12 +67,12 @@ NSAPI_PUBLIC ACLExprHandle_t *ACL_ExprNew(const ACLExprType_t expr_type);
 NSAPI_PUBLIC void ACL_ExprDestroy(ACLExprHandle_t *expr);
 NSAPI_PUBLIC int ACL_ExprSetPFlags(NSErr_t *errp, ACLExprHandle_t *expr, PFlags_t flags);
 NSAPI_PUBLIC int ACL_ExprClearPFlags(NSErr_t *errp, ACLExprHandle_t *expr);
-NSAPI_PUBLIC int ACL_ExprTerm(NSErr_t *errp, ACLExprHandle_t *acl_expr, char *attr_name, CmpOp_t cmp, char *attr_pattern);
+NSAPI_PUBLIC int ACL_ExprTerm(NSErr_t *errp, ACLExprHandle_t *acl_expr, const char *attr_name, CmpOp_t cmp, char *attr_pattern);
 NSAPI_PUBLIC int ACL_ExprNot(NSErr_t *errp, ACLExprHandle_t *acl_expr);
 NSAPI_PUBLIC int ACL_ExprAnd(NSErr_t *errp, ACLExprHandle_t *acl_expr);
 NSAPI_PUBLIC int ACL_ExprOr(NSErr_t *errp, ACLExprHandle_t *acl_expr);
 NSAPI_PUBLIC int ACL_ExprAddAuthInfo(ACLExprHandle_t *expr, PList_t auth_info);
-NSAPI_PUBLIC int ACL_ExprAddArg(NSErr_t *errp, ACLExprHandle_t *expr, char *arg);
+NSAPI_PUBLIC int ACL_ExprAddArg(NSErr_t *errp, ACLExprHandle_t *expr, const char *arg);
 NSAPI_PUBLIC int ACL_ExprSetDenyWith(NSErr_t *errp, ACLExprHandle_t *expr, char *deny_type, char *deny_response);
 NSAPI_PUBLIC int ACL_ExprGetDenyWith(NSErr_t *errp, ACLExprHandle_t *expr, char **deny_type, char **deny_response);
 
diff --git a/include/libaccess/las.h b/include/libaccess/las.h
index 2e5673d735df0f263f9a80958644a465fd1f1b7d..f2f4f33cab8eee34c8af823ca5519bb650abb173 100644
--- a/include/libaccess/las.h
+++ b/include/libaccess/las.h
@@ -74,7 +74,7 @@ struct ACLAttrGetter {
 NSPR_BEGIN_EXTERN_C
 
 NSAPI_PUBLIC extern int
-	ACL_LasRegister(NSErr_t *errp, char *attr_name, LASEvalFunc_t
+	ACL_LasRegister(NSErr_t *errp, const char *attr_name, LASEvalFunc_t
 	eval_func, LASFlushFunc_t flush_func);
 NSAPI_PUBLIC extern int
 	ACL_LasFindEval(NSErr_t *errp, char *attr_name, LASEvalFunc_t
diff --git a/include/libaccess/nsautherr.h b/include/libaccess/nsautherr.h
index 325e037342e5ac1b6c295ff32d1633dc83fc3505..2e36fce5517c6ea920d471c1da3a2a2c3c63e625 100644
--- a/include/libaccess/nsautherr.h
+++ b/include/libaccess/nsautherr.h
@@ -120,7 +120,7 @@
 NSPR_BEGIN_EXTERN_C
 
 /* Authentication facility name in nsuser.c */
-extern char * NSAuth_Program;
+extern const char * NSAuth_Program;
 
     /* Functions in nsautherr.c */
 extern NSAPI_PUBLIC void nsadbErrorFmt(NSErr_t * errp,
diff --git a/include/libaccess/nserror.h b/include/libaccess/nserror.h
index f6b5ef2aa240b7c1e2ac34cfac1ad0f95c7ad224..c03ca7cd18873a4d5cfe81b1ec0d56f0d8d48b68 100644
--- a/include/libaccess/nserror.h
+++ b/include/libaccess/nserror.h
@@ -71,7 +71,7 @@ extern void nserrDispose(NSErr_t * errp);
 extern NSEFrame_t * nserrFAlloc(NSErr_t * errp);
 extern void nserrFFree(NSErr_t * errp, NSEFrame_t * efp);
 extern NSEFrame_t * nserrGenerate(NSErr_t * errp, long retcode, long errorid,
-				  char * program, int errc, ...);
+				  const char * program, int errc, ...);
 
 /* Functions in nserrmsg.c */
 extern char * nserrMessage(NSEFrame_t * efp, int flags);
diff --git a/include/libaccess/symbols.h b/include/libaccess/symbols.h
index 73d04a491c8b099bfb5e73c86d59253276972670..f56b934bb717f6c20021cf7e9b4ac48cd6f4cdfb 100644
--- a/include/libaccess/symbols.h
+++ b/include/libaccess/symbols.h
@@ -97,7 +97,7 @@ static void symFreeTable(void * pool, void * item);
 
 typedef struct Symbol_s Symbol_t;
 struct Symbol_s {
-    char * sym_name;			/* pointer to symbol name string */
+    const char * sym_name;			/* pointer to symbol name string */
     int sym_type;			/* symbol type */
     void *sym_data;			/* symbol data storage */
 };
@@ -127,7 +127,7 @@ extern void symTableEnumerate(void * table, void * argp,
                               int (*func)(Symbol_t * sym, void * parg));
 #endif /* UnixWare */
 
-extern int symTableFindSym(void * table, char * symname,
+extern int symTableFindSym(void * table, const char * symname,
 			   int symtype, void **psymref);
 extern int symTableNew(void **ptable);
 
diff --git a/include/public/nsacl/aclapi.h b/include/public/nsacl/aclapi.h
index 617cabfe92f936945e6631146a979401c93631be..3b2f641f63dcea22451d53dea27c194431727f55 100644
--- a/include/public/nsacl/aclapi.h
+++ b/include/public/nsacl/aclapi.h
@@ -78,7 +78,7 @@ struct ACLDispatchVector {
     NSEFrame_t *(*f_nserrFAlloc)(NSErr_t * errp);
     void (*f_nserrFFree)(NSErr_t * errp, NSEFrame_t * efp);
     NSEFrame_t *(*f_nserrGenerate)(NSErr_t * errp, long retcode,
-                                   long errorid, char * program,
+                                   long errorid, const char * program,
                                    int errc, ...);
 
     /* Property list support 
@@ -117,7 +117,7 @@ struct ACLDispatchVector {
 
     /* ACL attribute handling */
 
-    int (*f_ACL_LasRegister)(NSErr_t *errp, char *attr_name,
+    int (*f_ACL_LasRegister)(NSErr_t *errp, const char *attr_name,
                              LASEvalFunc_t eval_func,
                              LASFlushFunc_t flush_func);
 
@@ -202,12 +202,13 @@ struct ACLDispatchVector {
                                ACLExprHandle_t *expr, PFlags_t flags);
     int (*f_ACL_ExprClearPFlags)(NSErr_t *errp, ACLExprHandle_t *expr);
     int (*f_ACL_ExprTerm)(NSErr_t *errp, ACLExprHandle_t *acl_expr,
-                          char *attr_name, CmpOp_t cmp, char *attr_pattern);
+                          const char *attr_name, CmpOp_t cmp,
+                          char *attr_pattern);
     int (*f_ACL_ExprNot)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
     int (*f_ACL_ExprAnd)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
     int (*f_ACL_ExprOr)(NSErr_t *errp, ACLExprHandle_t *acl_expr);
     int (*f_ACL_ExprAddAuthInfo)(ACLExprHandle_t *expr, PList_t auth_info);
-    int (*f_ACL_ExprAddArg)(NSErr_t *errp, ACLExprHandle_t *expr, char *arg);
+    int (*f_ACL_ExprAddArg)(NSErr_t *errp, ACLExprHandle_t *expr, const char *arg);
     int (*f_ACL_ExprSetDenyWith)(NSErr_t *errp, ACLExprHandle_t *expr,
                                  char *deny_type, char *deny_response);
     int (*f_ACL_ExprGetDenyWith)(NSErr_t *errp, ACLExprHandle_t *expr,
diff --git a/include/public/nsacl/acldef.h b/include/public/nsacl/acldef.h
index b3e9f4d19ecdd80a6df08ac229632806c398b477..dd2846f44ba57e2c7b3cad8ad1e2420b7d5fb554 100644
--- a/include/public/nsacl/acldef.h
+++ b/include/public/nsacl/acldef.h
@@ -429,7 +429,7 @@ typedef struct ldap LDAP;
 
 #ifdef	ALLOCATE_ATTR_TABLE
 /* Must be in the same order as the index numbers */
-char	*ACLAttrTable[] = {
+const char	*ACLAttrTable[] = {
 		 NULL,				/*  0 */
 /* Don't have one numbered 0 */
 		 ACL_ATTR_GROUP,		/*  1 */
diff --git a/lib/base/file.cpp b/lib/base/file.cpp
index 6dc39e650bd5f76ab45cf59b0bd1817266226d84..82a1852f6e2034c3b30b8fe7f59d4879fc754502 100644
--- a/lib/base/file.cpp
+++ b/lib/base/file.cpp
@@ -613,7 +613,7 @@ with lmsg =strerror(errno);*/
     return msglen;
 }
 
-NSAPI_PUBLIC char *
+NSAPI_PUBLIC const char *
 system_errmsg(void)
 {
     char *buff = 0;
@@ -632,7 +632,7 @@ system_errmsg(void)
     }
     system_errmsg_fn(&buff, errbuf_size);
     if (buff == 0)
-        buff = "Could not retrieve system error message";
+        return "Could not retrieve system error message";
     return buff;
 }
 
diff --git a/lib/base/util.cpp b/lib/base/util.cpp
index 01f916d59d0c68b74ceefb390beb33038a2c4587..164d1a06a0894948df3040451d7002c8e7bf2022 100644
--- a/lib/base/util.cpp
+++ b/lib/base/util.cpp
@@ -232,19 +232,19 @@ static char sccsid[] = "@(#)strftime.c	5.11 (Berkeley) 2/24/91";
 #include <stdio.h>
 #endif
 
-static char *afmt[] = {
+static const char *afmt[] = {
 	"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
 };
-static char *Afmt[] = {
+static const char *Afmt[] = {
 	"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
 	"Saturday",
 };
 
-static char *bfmt[] = {
+static const char *bfmt[] = {
 	"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
 	"Oct", "Nov", "Dec",
 };
-static char *Bfmt[] = {
+static const char *Bfmt[] = {
 	"January", "February", "March", "April", "May", "June", "July",
 	"August", "September", "October", "November", "December",
 };
@@ -265,7 +265,7 @@ int
 util_strftime(char *pt, const char *format, const struct tm *t)
 {
     char *start = pt;
-	char *scrap;
+	const char *scrap;
 
 	for (; *format; ++format) {
 		if (*format == '%')
diff --git a/lib/ldaputil/cert.c b/lib/ldaputil/cert.c
index c26ff41f27ae7c38529f1a78adc45249b68d8d52..2594a2dc11641cc038e4b3c459b1e59e8a732bc9 100644
--- a/lib/ldaputil/cert.c
+++ b/lib/ldaputil/cert.c
@@ -285,7 +285,7 @@ _replaceAVA (char* attr, char** avas)
 }
 
 struct _attr_getter_pair {
-    char* (*getter) (CERTName* dn);
+    char* (*getter) (const CERTName* dn);
     const char* name1;
     const char* name2;
 } _attr_getter_table[] =
diff --git a/lib/libaccess/acl.tab.cpp b/lib/libaccess/acl.tab.cpp
index 27c8c1b3cff3c177a50b796d38fcbf492f6e50bb..db4b0f544a3ff7439bf8118d6445ffe1fc6def9a 100644
--- a/lib/libaccess/acl.tab.cpp
+++ b/lib/libaccess/acl.tab.cpp
@@ -179,7 +179,7 @@ acl_set_ip_dns(ACLExprHandle_t *expr, char **ip_dns)
 	int ii;
 	int jj;
 	int len;
-	char *attr;
+	const char *attr;
 	char *val;
 
         if (expr == NULL)
diff --git a/lib/libaccess/aclerror.cpp b/lib/libaccess/aclerror.cpp
index 8e94f6423bfb0fad5e07778ba631b8241aa80c1c..7fadf3371ead3dceee95e990c7794a93f4133c65 100644
--- a/lib/libaccess/aclerror.cpp
+++ b/lib/libaccess/aclerror.cpp
@@ -76,8 +76,8 @@
 #define aclerrfail	XP_GetAdminStr(DBT_AclerrfmtAclerrfail)
 #define aclerrio	XP_GetAdminStr(DBT_AclerrfmtAclerrio)
 
-char * NSAuth_Program = "NSAUTH";
-char * ACL_Program = "NSACL";               /* ACL facility name */
+const char * NSAuth_Program = "NSAUTH";
+const char * ACL_Program = "NSACL";               /* ACL facility name */
 
 /*
  * Description (aclErrorFmt)
diff --git a/lib/libaccess/acleval.cpp b/lib/libaccess/acleval.cpp
index bf7a47366cb4df40966e06b7977e8db0621ab413..dde3487a13caffa19d6a9541001b9303701adb44 100644
--- a/lib/libaccess/acleval.cpp
+++ b/lib/libaccess/acleval.cpp
@@ -72,9 +72,9 @@
 				!strcmp((rlm1)->rlm_dbname, \
 					(rlm2)->rlm_dbname))))
 
-int aclDNSLookup(DNSFilter_t * dnf, char * dnsspec, int fqdn, char **match)
+int aclDNSLookup(DNSFilter_t * dnf, const char * dnsspec, int fqdn, const char **match)
 {
-    char * subdns;		/* suffix of client DNS name */
+    const char * subdns;	/* suffix of client DNS name */
     void * table;		/* hash table pointer */
     Symbol_t * sym;		/* DNS spec symbol pointer */
     int rv;			/* result value */
diff --git a/lib/libaccess/aclspace.cpp b/lib/libaccess/aclspace.cpp
index a33c862148a3cf642c0a25f4cf3df46ac043d1bc..c9a1cfb2666bfb0b8257cd29fc259efdf348babc 100644
--- a/lib/libaccess/aclspace.cpp
+++ b/lib/libaccess/aclspace.cpp
@@ -47,7 +47,7 @@
 #include	<libaccess/aclglobal.h>
 
 /* Ordered list of generic rights	*/
-char	*generic_rights[7] = {
+const char	*generic_rights[7] = {
 				"read",
 				"write",
 				"execute",
@@ -57,7 +57,7 @@ char	*generic_rights[7] = {
 				NULL
 			} ;
 
-char	*http_generic[7] = {
+const char	*http_generic[7] = {
 				"http_get, http_head, http_trace, http_revlog, http_options, http_copy, http_getattribute, http_index, http_getproperties, http_getattributenames ",
 				"http_put, http_mkdir, http_startrev, http_stoprev, http_edit, http_post, http_save, http_setattribute, http_revadd, http_revlabel, http_lock, http_unlock, http_unedit, http_stoprev, http_startrev",
 				"http_post",
diff --git a/lib/libaccess/acltext.y b/lib/libaccess/acltext.y
index 6ec9567d332ad55b9e74645ce4d674f4a97bb11d..20198128405c3462f7820ee4a4de896242c6632e 100644
--- a/lib/libaccess/acltext.y
+++ b/lib/libaccess/acltext.y
@@ -179,7 +179,7 @@ acl_set_ip_dns(ACLExprHandle_t *expr, char **ip_dns)
 	int ii;
 	int jj;
 	int len;
-	char *attr;
+	const char *attr;
 	char *val;
 
         if (expr == NULL)
diff --git a/lib/libaccess/acltools.cpp b/lib/libaccess/acltools.cpp
index 3ef2bebe2b7a3f9d638a28191eeaa113d651c929..0eb73873cfa597a80c687e585247b0b0e4f8b407 100644
--- a/lib/libaccess/acltools.cpp
+++ b/lib/libaccess/acltools.cpp
@@ -229,7 +229,7 @@ ACL_AddPermInfo( NSErr_t *errp, ACLHandle_t *acl,
 NSAPI_PUBLIC int
 ACL_ExprAddArg( NSErr_t *errp, 
     ACLExprHandle_t *expr, 
-    char *arg )
+    const char *arg )
 {
 
     if ( expr == NULL ) 
@@ -406,7 +406,7 @@ acl_index_string ( int value, char *buffer )
  * displays ASCII equivalent of CmpOp_t
  */
 
-static char *
+static const char *
 acl_comp_string( CmpOp_t cmp )
 {
     switch (cmp) {
@@ -445,7 +445,7 @@ acl_comp_string( CmpOp_t cmp )
 
 NSAPI_PUBLIC int 
 ACL_ExprTerm( NSErr_t *errp, ACLExprHandle_t *acl_expr,
-        char *attr_name, 
+        const char *attr_name,
         CmpOp_t cmp, 
         char *attr_pattern )
 {
@@ -1381,7 +1381,7 @@ ACL_ParseString( NSErr_t *errp, char *buffer )
 ACLListHandle_t 	*handle = NULL;
 int			eid = 0;
 int			rv = 0;
-char			*errmsg;
+const char			*errmsg;
 
     ACL_InitAttr2Index();
 
@@ -1555,7 +1555,7 @@ ACL_ListGetNameList(NSErr_t *errp, ACLListHandle_t *acl_list, char ***name_list)
     int			list_size;
     char		**tmp_list;
     char		**local_list;
-    char		*name;
+    const char		*name;
     
 
     if ( acl_list == NULL )
diff --git a/lib/libaccess/lasip.cpp b/lib/libaccess/lasip.cpp
index e66f48aa489277d0b2e99d8cc3c8449beaaabf65..f6d664a5bc961655662a2f885d0131d0a1f4e134 100644
--- a/lib/libaccess/lasip.cpp
+++ b/lib/libaccess/lasip.cpp
@@ -69,7 +69,7 @@
 extern int LASIpGetIp();
 #endif
 
-static int colonhex_ipv6(char *ipstr, char *netmaskstr, PRIPv6Addr *ipv6, int *netmask);
+static int colonhex_ipv6(char *ipstr, const char *netmaskstr, PRIPv6Addr *ipv6, int *netmask);
 static int LASIpAddPattern(NSErr_t *errp, int netmask, int pattern, LASIpTree_t **treetop);
 static int LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LASIpTree_t **treetop);
 
@@ -86,7 +86,7 @@ static int LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LAS
  *    result        NULL on success or else one of the LAS_EVAL_* codes.
  */
 int
-dotdecimal(char *ipstr, char *netmaskstr, int *ip, int *netmask)
+dotdecimal(char *ipstr, const char *netmaskstr, int *ip, int *netmask)
 {
     int     i;
     char    token[64];
@@ -114,7 +114,7 @@ dotdecimal(char *ipstr, char *netmaskstr, int *ip, int *netmask)
     *netmask = *ip = 0;    /* Start with "don't care"    */
 
     for (i=0; i<4; i++) {
-        dotptr    = strchr(netmaskstr, '.');
+        dotptr    = strchr((char*)netmaskstr, '.');
 
         /* copy out the token, then point beyond it */
         if (dotptr == NULL)
@@ -725,7 +725,7 @@ LASIpAddPatternIPv6(NSErr_t *errp, int netmask, PRIPv6Addr *ipv6, LASIpTree_t **
  *  This is very similar to dotdecimal(), but for ipv6 addresses
  */
 static int
-colonhex_ipv6(char *ipstr, char *netmaskstr, PRIPv6Addr *ipv6, int *netmask)
+colonhex_ipv6(char *ipstr, const char *netmaskstr, PRIPv6Addr *ipv6, int *netmask)
 {
     PRNetAddr addr;
     /*
diff --git a/lib/libaccess/nsautherr.cpp b/lib/libaccess/nsautherr.cpp
index 7cea84e813d0a8b27b7dfb071d01a1cc950d4690..cccb1949f3a8cc4465388f9e75053333664d31ff 100644
--- a/lib/libaccess/nsautherr.cpp
+++ b/lib/libaccess/nsautherr.cpp
@@ -55,12 +55,12 @@
 #include "libaccess/nsautherr.h"
 
 /* Error message formats XXX internationalize XXX */
-static char * nsaerrnomem = "insufficient dynamic memory";
-static char * nsaerrinval = "invalid argument";
-static char * nsaerropen = "error opening %s";
-static char * nsaerrmkdir = "error creating %s";
-static char * nsaerrname = "%s not found in database %s";
-static char * unknownerr = "error code %d";
+static const char * nsaerrnomem = "insufficient dynamic memory";
+static const char * nsaerrinval = "invalid argument";
+static const char * nsaerropen = "error opening %s";
+static const char * nsaerrmkdir = "error creating %s";
+static const char * nsaerrname = "%s not found in database %s";
+static const char * unknownerr = "error code %d";
 
 /*
  * Description (nsadbErrorFmt)
diff --git a/lib/libaccess/oneeval.cpp b/lib/libaccess/oneeval.cpp
index 8e31940a8f22c6937c15b7e64fb9ae5d4d6c9bef..807796923af80f1cc563418bd5ff2f7b87649843 100644
--- a/lib/libaccess/oneeval.cpp
+++ b/lib/libaccess/oneeval.cpp
@@ -609,8 +609,8 @@ static int
 ACL_INTEvalTestRights(
     NSErr_t          *errp,
     ACLEvalHandle_t  *acleval,
-    char    **rights,
-    char    **map_generic,
+    const char    **rights,
+    const char    **map_generic,
     char    **deny_type,
     char    **deny_response,
     char    **acl_tag,
@@ -638,7 +638,7 @@ ACL_INTEvalTestRights(
     int absolute = 0;
     int skipflag;
     int g_num;    /* index into the generic rights array.  */
-    char **g_rights;
+    const char **g_rights;
     PList_t global_auth=NULL;
     int allow_error = 0;
     int allow_absolute = 0;
@@ -953,7 +953,7 @@ ACL_CachableAclList(ACLListHandle_t *acllist)
     char *acl_tag;
     int  expr_num;
     int  rv;
-    static char *rights[] = { "http_get", NULL };
+    static const char *rights[] = { "http_get", NULL };
     ACLCachable_t cachable=ACL_INDEF_CACHABLE;
 
     if (!acllist  ||  acllist == ACL_LIST_NO_ACLS) {
@@ -978,8 +978,8 @@ NSAPI_PUBLIC int
 ACL_EvalTestRights(
     NSErr_t          *errp,
     ACLEvalHandle_t  *acleval,
-    char    **rights,
-    char    **map_generic,
+    const char    **rights,
+    const char    **map_generic,
     char    **deny_type,
     char    **deny_response,
     char    **acl_tag,
diff --git a/lib/libaccess/symbols.cpp b/lib/libaccess/symbols.cpp
index 209c05ba2126b2bf62b0677f38dd6b97c110a08b..a1cba9da65468f3ca85a9b95b1de48ab1e5be4b4 100644
--- a/lib/libaccess/symbols.cpp
+++ b/lib/libaccess/symbols.cpp
@@ -121,7 +121,7 @@ static int symCmpValue(const void * value1, const void * value2)
 static PLHashNumber symHash(const void * symkey)
 {
     Symbol_t * sym = (Symbol_t *)symkey;
-    char * cp;
+    const char * cp;
     PLHashNumber h;
 
     h = sym->sym_type;
@@ -289,7 +289,7 @@ void symTableEnumerate(void * table, void * argp,
  *	negative return code (SYMERRxxxx - see symbols.h).
  */
 
-int symTableFindSym(void * table, char * symname,
+int symTableFindSym(void * table, const char * symname,
 		      int symtype, void **psymref)
 {
     SymTable_t * st = (SymTable_t *)table;
diff --git a/lib/libadmin/error.c b/lib/libadmin/error.c
index 4ba98036c88953ab7ce59f8e701732f7bf9fd792..a277cd8c5d15faa83faf12414e744a7461cae7ac 100644
--- a/lib/libadmin/error.c
+++ b/lib/libadmin/error.c
@@ -127,7 +127,7 @@ NSAPI_PUBLIC void output_alert(int type, char *info, char *details, int wait)
     if(type==FILE_ERROR || type==SYSTEM_ERROR)  {
         err = get_error();
         if(err != 0){
-            char *err_str = verbose_error();
+            const char *err_str = verbose_error();
             fprintf(stdout,
                         "\\n\\nThe system returned error number %d, "
                         "which is %s.", err, err_str);
diff --git a/lib/libsi18n/getstrprop.c b/lib/libsi18n/getstrprop.c
index c63d6ba18365c6583de7c3ce0d2f635417099a68..22cbafb9cfa879c9b549063f3e2de05a6ab2650d 100644
--- a/lib/libsi18n/getstrprop.c
+++ b/lib/libsi18n/getstrprop.c
@@ -50,7 +50,7 @@
 #include "getstrmem.h"
 
 static char*
-XP_GetStringFromMemory(char* strLibraryName,int iToken)
+XP_GetStringFromMemory(const char* strLibraryName,int iToken)
 {
   /*
    * In memory model called by XP_GetStringFromDatabase
@@ -66,7 +66,7 @@ XP_GetStringFromMemory(char* strLibraryName,int iToken)
   unsigned hashKey;
   int      found = 0;
   unsigned uToken = iToken;
-  char*    cPtr;
+  const char*    cPtr;
   DATABIN* pBucket;
 
   /* calculate hash key */
@@ -102,12 +102,12 @@ XP_GetStringFromMemory(char* strLibraryName,int iToken)
 
 }
 
-char*
-XP_GetStringFromDatabase(char* strLibraryName,
-                         char* strLanguage,
+const char*
+XP_GetStringFromDatabase(const char* strLibraryName,
+                         const char* strLanguage,
                          int key)
 {
-    char *result = NULL;
+    const char *result = NULL;
 
     /* we use memory strings only in ds. */
     if (result == NULL)
-- 
1.8.3.1

