Permalink
Browse files

Merge remote branch 'core/engine-pu' into branch-20

* core/engine-pu:
  Define _GNU_SOURCE for Linux when using Oracle Solaris Studio on Linux
  Check for the existence of __builtin_expect before defining it
  Fix compilation warning when compiling without SASL support
  • Loading branch information...
2 parents a0147e2 + cb6290c commit fa613adacc661451fb73c2e4198ac0c85fdd1840 @trondn trondn committed Aug 8, 2011
Showing with 4 additions and 2 deletions.
  1. +1 −0 configure.ac
  2. +2 −1 daemon/memcached.c
  3. +1 −1 daemon/memcached.h
View
@@ -484,6 +484,7 @@ then
AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
elif test "$SUNCC" = "yes"
then
+ AC_CHECK_DECL([__linux], [ AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux]) ])
CFLAGS="$CFLAGS -errfmt=error -errwarn -errshort=tags"
fi
View
@@ -7178,8 +7178,9 @@ int main (int argc, char **argv) {
settings.extensions.logger->log(EXTENSION_LOG_WARNING, NULL,
"This server is not built with SASL support.\n");
exit(EX_USAGE);
-#endif
+#else
settings.require_sasl = true;
+#endif
break;
case 'X' :
{
View
@@ -480,7 +480,7 @@ bool conn_add_tap_client(conn *c);
bool conn_setup_tap_stream(conn *c);
/* If supported, give compiler hints for branch prediction. */
-#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+#if !defined(__builtin_expect) && (!defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96))
#define __builtin_expect(x, expected_value) (x)
#endif

0 comments on commit fa613ad

Please sign in to comment.