Merged in two missing changes from f-visibility tree.
authorMonty Taylor <mordred@inaugust.com>
Wed, 8 Jul 2009 18:58:47 +0000 (11:58 -0700)
committerMonty Taylor <mordred@inaugust.com>
Wed, 8 Jul 2009 18:58:47 +0000 (11:58 -0700)
libmemcached/memcached/protocol_binary.h
libmemcached/visibility.h
m4/protocol_binary.m4

index 7a59ade32a268593e62b4bc3ddabb929ecdec61c..08df72e8b10fe0c505086443c8409f49ecd6a118 100644 (file)
  * Author: Trond Norbye <trond.norbye@sun.com>
  */
 
-#ifndef LIBMEMCACHED_MEMCACHED_PROTOCOL_BINARY_H
-#define LIBMEMCACHED_MEMCACHED_PROTOCOL_BINARY_H
-
-#if defined(BUILDING_LIBMEMCACHED)
+#ifndef PROTOCOL_BINARY_H
+#define PROTOCOL_BINARY_H
 
 #include <stdint.h>
 
@@ -360,6 +358,4 @@ extern "C"
 #ifdef __cplusplus
 }
 #endif
-
-#endif /* BUILDING_LIBMEMCACHED */
-#endif /* LIBMEMCACHED_MEMCACHED_PROTOCOL_BINARY_H */
+#endif /* PROTOCOL_BINARY_H */
index 049137e3718f189f8a745f874c5471d403793050..6bb6382bd2000c94311b3b4f8230f1a261f0d9fa 100644 (file)
  */
 
 #if defined(BUILDING_LIBMEMCACHED)
-# if defined(HAVE_VISIBILITY)
+# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
 #  define LIBMEMCACHED_API __attribute__ ((visibility("default")))
 #  define LIBMEMCACHED_LOCAL  __attribute__ ((visibility("hidden")))
+# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#  define LIBMEMCACHED_API __global
+#  define LIBMEMCACHED_LOCAL __hidden
 # elif defined(_MSC_VER)
 #  define LIBMEMCACHED_API extern __declspec(dllexport) 
 #  define LIBMEMCACHED_LOCAL
index 2c654e4acc58f158c663f44a1a078d7e454ecf5c..d31bcb04a2a06c1ca2ab9af82e3b76f090ac9b39 100644 (file)
@@ -4,7 +4,7 @@ dnl ---------------------------------------------------------------------------
 AC_DEFUN([PROTOCOL_BINARY_TEST],
   [AC_LANG_PUSH([C])
    save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS -I${srcdir} -DBUILDING_LIBMEMCACHED"
+   CFLAGS="$CFLAGS -I${srcdir}"
    AC_RUN_IFELSE([ 
       AC_LANG_PROGRAM([[
 #include "libmemcached/memcached/protocol_binary.h"