Print this page
Bump Apache dependency to Apache 2

@@ -18,19 +18,18 @@
  *
  * CDDL HEADER END
  */
 
 /*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
  */
 
 /* $Id: attribute.c 157 2006-04-26 15:07:55Z ktou $ */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 /*LINTLIBRARY*/
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>

@@ -201,11 +200,11 @@
 
         return (result);
 }
 
 static papi_attribute_t *
-papiAttributeAlloc(char *name, papi_attribute_value_type_t type)
+papiAttributeAlloc(const char *name, papi_attribute_value_type_t type)
 {
         papi_attribute_t *result = NULL;
 
         if ((result = calloc(1, sizeof (*result))) != NULL) {
                 result->name = strdup(name);

@@ -236,11 +235,11 @@
         return (PAPI_OK);
 }
 
 papi_status_t
 papiAttributeListAddValue(papi_attribute_t ***list, int flgs,
-                char *name, papi_attribute_value_type_t type,
+                const char *name, papi_attribute_value_type_t type,
                 papi_attribute_value_t *value)
 {
         papi_status_t result;
         int flags = flgs;
         papi_attribute_t *attribute = NULL;

@@ -316,11 +315,11 @@
         return (papiAttributeListAddValue(list, flags, name, PAPI_INTEGER, &v));
 }
 
 papi_status_t
 papiAttributeListAddBoolean(papi_attribute_t ***list, int flags,
-                        char *name, char boolean)
+                        const char *name, char boolean)
 {
         papi_attribute_value_t v;
 
         v.boolean = boolean;
         return (papiAttributeListAddValue(list, flags, name, PAPI_BOOLEAN, &v));

@@ -400,11 +399,11 @@
 
         return (PAPI_OK);
 }
 
 papi_attribute_t *
-papiAttributeListFind(papi_attribute_t **list, char *name)
+papiAttributeListFind(papi_attribute_t **list, const char *name)
 {
         int i;
         if ((list == NULL) || (name == NULL))
                 return (NULL);