Protected stdbool.h from being included by C++, which is invalid on Sun Studio.
[awesomized/libmemcached] / clients / execute.c
index 30fb5f180cca0cf0d1983d665f87d3c6438881f9..130fef0b67919e1c7290ddb0fafff7d7d464023a 100644 (file)
@@ -1,3 +1,14 @@
+/* LibMemcached
+ * Copyright (C) 2006-2009 Brian Aker
+ * All rights reserved.
+ *
+ * Use and distribution licensed under the BSD license.  See
+ * the COPYING file in the parent directory for full text.
+ *
+ * Summary:
+ *
+ */
+
 /*
   Execute a memcached_set() a set of pairs.
   Return the number of rows set.
@@ -9,7 +20,7 @@
 
 unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int number_of)
 {
-  memcached_return rc;
+  memcached_return_t rc;
   unsigned int x;
   unsigned int pairs_sent;
 
@@ -34,7 +45,7 @@ unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int numbe
 */
 unsigned int execute_get(memcached_st *memc, pairs_st *pairs, unsigned int number_of)
 {
-  memcached_return rc;
+  memcached_return_t rc;
   unsigned int x;
   unsigned int retrieved;
 
@@ -66,7 +77,7 @@ unsigned int execute_get(memcached_st *memc, pairs_st *pairs, unsigned int numbe
 /**
  * Callback function to count the number of results
  */
-static memcached_return callback_counter(memcached_st *ptr,
+static memcached_return_t callback_counter(memcached_st *ptr,
                                          memcached_result_st *result,
                                          void *context)
 {
@@ -92,8 +103,8 @@ unsigned int execute_mget(memcached_st *memc,
                           unsigned int number_of)
 {
   unsigned int retrieved= 0;
-  memcached_execute_function callbacks[1]= { [0]= &callback_counter };
-  memcached_return rc;
+  memcached_execute_fn callbacks[1]= { [0]= &callback_counter };
+  memcached_return_t rc;
   rc= memcached_mget_execute(memc, keys, key_length,
                              (size_t)number_of, callbacks, &retrieved, 1);