MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonathan Perkin Date:April 17 2008 8:54pm
Subject:bk commit into 6.0 tree (jperkin:1.2619) BUG#34292
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of jperkin.  When jperkin does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-04-17 22:54:31+02:00, jperkin@stripped +8 -0
  Various build fixes for 6.0.5-alpha
  
  SyncObject.cpp:
    #include <string.h> for strlen()
  plug.in, Makefile.am, configure.in:
    CXXFLAGS is a user variable, you should not override it;
    use AM_CXXFLAGS instead.
  hostname.cc:
    EAI_NODATA was deprecated in RFC3493, and at least FreeBSD
    has removed it in favour of EAI_NONAME, so handle that
    case.  May fix bug#34292.
  libevent.m4:
    Wrap AH_VERBATIM sections within HAVE_LIBEVENT as
    they are defined unconditionally and break if
    libevent is not used.
  azio.h:
    No comma for final enum.

  config/ac-macros/libevent.m4@stripped, 2008-04-17 20:57:34+02:00, jperkin@stripped +5 -5
    Wrap AH_VERBATIM sections within HAVE_LIBEVENT as
    they are defined unconditionally and break if
    libevent is not used.

  configure.in@stripped, 2008-04-17 22:50:47+02:00, jperkin@stripped +3 -0
    CXXFLAGS is a user variable, you should not override it;
    use AM_CXXFLAGS instead.

  sql/hostname.cc@stripped, 2008-04-17 15:38:01+02:00, jperkin@stripped +4 -0
    EAI_NODATA was deprecated in RFC3493, and at least FreeBSD
    has removed it in favour of EAI_NONAME, so handle that
    case.  May fix bug#34292.

  storage/archive/azio.h@stripped, 2008-04-17 18:36:25+02:00, jperkin@stripped +1 -1
    No comma for final enum.

  storage/falcon/Makefile.am@stripped, 2008-04-17 22:51:34+02:00, jperkin@stripped +1 -1
    CXXFLAGS is a user variable, you should not override it;
    use AM_CXXFLAGS instead.

  storage/falcon/SyncObject.cpp@stripped, 2008-04-17 14:42:30+02:00, jperkin@stripped +1 -0
    #include <string.h> for strlen()

  storage/falcon/TransformLib/Makefile.am@stripped, 2008-04-17 22:51:44+02:00, jperkin@stripped +1 -1
    CXXFLAGS is a user variable, you should not override it;
    use AM_CXXFLAGS instead.

  storage/falcon/plug.in@stripped, 2008-04-17 22:51:54+02:00, jperkin@stripped +30 -7
    CXXFLAGS is a user variable, you should not override it;
    use AM_CXXFLAGS instead.

diff -Nrup a/config/ac-macros/libevent.m4 b/config/ac-macros/libevent.m4
--- a/config/ac-macros/libevent.m4	2008-02-01 00:18:54 +01:00
+++ b/config/ac-macros/libevent.m4	2008-04-17 20:57:34 +02:00
@@ -295,7 +295,7 @@ AC_TRY_COMPILE([],
 AH_VERBATIM([HAVE_TIMERADD], [
 /* Define if timeradd is defined in <sys/time.h> */
 #undef HAVE_TIMERADD
-#ifndef HAVE_TIMERADD
+#if defined(HAVE_LIBEVENT) && !defined(HAVE_TIMERADD)
 #undef timersub
 #define timeradd(tvp, uvp, vvp)						\
 	do {								\
@@ -320,14 +320,14 @@ AH_VERBATIM([HAVE_TIMERADD], [
 
 AH_VERBATIM([HAVE_TIMERCLEAR], [
 #undef HAVE_TIMERCLEAR
-#ifndef HAVE_TIMERCLEAR
+#if defined(HAVE_LIBEVENT) && !defined(HAVE_TIMERCLEAR)
 #define	timerclear(tvp)	(tvp)->tv_sec = (tvp)->tv_usec = 0
 #endif
 ])
 
 AH_VERBATIM([HAVE_TIMERCMP], [
 #undef HAVE_TIMERCMP
-#ifndef HAVE_TIMERCMP
+#if defined(HAVE_LIBEVENT) && !defined(HAVE_TIMERCMP)
 #undef timercmp
 #define	timercmp(tvp, uvp, cmp)						\
 	(((tvp)->tv_sec == (uvp)->tv_sec) ?				\
@@ -338,7 +338,7 @@ AH_VERBATIM([HAVE_TIMERCMP], [
 
 AH_VERBATIM([HAVE_TIMERISSET], [
 #undef HAVE_TIMERISSET
-#ifndef HAVE_TIMERISSET
+#if defined(HAVE_LIBEVENT) && !defined(HAVE_TIMERISSET)
 #undef timerisset
 #define	timerisset(tvp)	((tvp)->tv_sec || (tvp)->tv_usec)
 #endif
@@ -347,7 +347,7 @@ AH_VERBATIM([HAVE_TIMERISSET], [
 AH_VERBATIM([HAVE_TAILQFOREACH], [
 /* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
 #undef HAVE_TAILQFOREACH
-#ifndef HAVE_TAILQFOREACH
+#if defined(HAVE_LIBEVENT) && !defined(HAVE_TAILQFOREACH)
 #define	TAILQ_FIRST(head)		((head)->tqh_first)
 #define	TAILQ_END(head)			NULL
 #define	TAILQ_NEXT(elm, field)		((elm)->field.tqe_next)
diff -Nrup a/configure.in b/configure.in
--- a/configure.in	2008-04-07 17:26:34 +02:00
+++ b/configure.in	2008-04-17 22:50:47 +02:00
@@ -2753,6 +2753,9 @@ case $SYSTEM_TYPE in
 esac
 AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
 
+# Ensure that $(MYSQL_EXTRA_CXXFLAGS) is last
+CXXFLAGS="$CXXFLAGS \$(MYSQL_EXTRA_CXXFLAGS)"
+
 # Output results
 if test -d "$srcdir/pstack" ; then
   AC_CONFIG_FILES(pstack/Makefile pstack/aout/Makefile)
diff -Nrup a/sql/hostname.cc b/sql/hostname.cc
--- a/sql/hostname.cc	2008-02-06 13:20:34 +01:00
+++ b/sql/hostname.cc	2008-04-17 15:38:01 +02:00
@@ -231,7 +231,11 @@ char *ip_to_hostname(struct sockaddr_sto
       this define is in this place for this reason.
     */
     DBUG_PRINT("error",("getaddrinfo returned %d", gxi_error));
+#ifdef EAI_NODATA
     if (gxi_error == EAI_NODATA )
+#else
+    if (gxi_error == EAI_NONAME )
+#endif
       add_wrong_ip(in);
 
     my_free(name,MYF(0));
diff -Nrup a/storage/archive/azio.h b/storage/archive/azio.h
--- a/storage/archive/azio.h	2007-12-21 02:24:12 +01:00
+++ b/storage/archive/azio.h	2008-04-17 18:36:25 +02:00
@@ -225,7 +225,7 @@ typedef enum {
 typedef enum {
   AZ_METHOD_BLOCK,
   AZ_METHOD_AIO,
-  AZ_METHOD_MAX,
+  AZ_METHOD_MAX
 } az_method;
 
 typedef struct azio_container_st azio_container_st;
diff -Nrup a/storage/falcon/Makefile.am b/storage/falcon/Makefile.am
--- a/storage/falcon/Makefile.am	2008-02-29 20:02:47 +01:00
+++ b/storage/falcon/Makefile.am	2008-04-17 22:51:34 +02:00
@@ -16,7 +16,7 @@
 SUBDIRS= TransformLib
 
 # Re-enable implicit templates and exceptions
-CXXFLAGS= @CXXFLAGS@ -fimplicit-templates @FALCON_CXXFLAGS@
+MYSQL_EXTRA_CXXFLAGS = @FALCON_CXXFLAGS@
 
 DEFS= @DEFS@ \
       -D_REENTRANT -D_PTHREADS -DENGINE -DSTORAGE_ENGINE -DNAMESPACE=Nfs
diff -Nrup a/storage/falcon/SyncObject.cpp b/storage/falcon/SyncObject.cpp
--- a/storage/falcon/SyncObject.cpp	2008-04-09 10:23:49 +02:00
+++ b/storage/falcon/SyncObject.cpp	2008-04-17 14:42:30 +02:00
@@ -18,6 +18,7 @@
 //////////////////////////////////////////////////////////////////////
 
 #include <stdio.h>
+#include <string.h>
 #include <memory.h>
 
 #ifdef _WIN32
diff -Nrup a/storage/falcon/TransformLib/Makefile.am b/storage/falcon/TransformLib/Makefile.am
--- a/storage/falcon/TransformLib/Makefile.am	2007-09-30 23:11:01 +02:00
+++ b/storage/falcon/TransformLib/Makefile.am	2008-04-17 22:51:44 +02:00
@@ -14,7 +14,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 # Re-enable implicit templates and exceptions
-CXXFLAGS= @CXXFLAGS@ -fimplicit-templates -fexceptions
+MYSQL_EXTRA_CXXFLAGS = @FALCON_CXXFLAGS@
 
 INCLUDES= -I$(srcdir)/.. @ZLIB_INCLUDES@
 
diff -Nrup a/storage/falcon/plug.in b/storage/falcon/plug.in
--- a/storage/falcon/plug.in	2008-03-11 16:16:31 +01:00
+++ b/storage/falcon/plug.in	2008-04-17 22:51:54 +02:00
@@ -47,24 +47,47 @@ fi
 MYSQL_PLUGIN_ACTIONS(falcon,[
   AC_CONFIG_FILES(storage/falcon/TransformLib/Makefile)
 
+  AC_LANG_PUSH([C++])
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  AC_CACHE_CHECK([compiler flag to enable implicit templates],
+                 falcon_cxx_enable_implicit_templates,[
+    CXXFLAGS="$ac_save_CXXFLAGS -fimplicit-templates"
+    AC_TRY_COMPILE([],
+      [int i = 0;
+       i++;],
+      falcon_cxx_enable_implicit_templates="-fimplicit-templates",
+      falcon_cxx_enable_implicit_templates=""
+    )
+  ])
+
+  AC_CACHE_CHECK([compiler flag to enable exceptions],
+                 falcon_cxx_enable_exceptions,[
+    CXXFLAGS="$ac_save_CXXFLAGS -fexceptions"
+    AC_TRY_COMPILE([],
+      [int i = 0;
+       i++;],
+      falcon_cxx_enable_exceptions="-fexceptions",
+      falcon_cxx_enable_exceptions=""
+    )
+  ])
+
   AC_CACHE_CHECK([compiler flag to silence offsetof warnings],
                  falcon_cxx_no_invalid_offsetof,[
-    AC_LANG_PUSH([C++])
-    ac_save_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof"
+    CXXFLAGS="$ac_save_CXXFLAGS -Wno-invalid-offsetof"
     AC_TRY_COMPILE([],
       [int i = 0;
        i++;],
       falcon_cxx_no_invalid_offsetof="-Wno-invalid-offsetof",
       falcon_cxx_no_invalid_offsetof=""
     )
-    CXXFLAGS=$ac_save_CXXFLAGS
-    AC_LANG_POP([C++])
   ])
 
+  CXXFLAGS=$ac_save_CXXFLAGS
+  AC_LANG_POP([C++])
+
   # Falcon uses exceptions and STL.
-  CXXLDFLAGS="$CXXLDFLAGS -fexceptions -lstdc++"
-  FALCON_CXXFLAGS="$falcon_cxx_no_invalid_offsetof -fexceptions"
+  CXXLDFLAGS="$CXXLDFLAGS $falcon_cxx_enable_exceptions -lstdc++"
+  FALCON_CXXFLAGS="$falcon_cxx_no_invalid_offsetof $falcon_cxx_enable_implicit_templates $falcon_cxx_enable_exceptions"
   case "$with_debug" in
     yes)  FALCON_CXXFLAGS="$FALCON_CXXFLAGS -D_DEBUG" ;;
     full) FALCON_CXXFLAGS="$FALCON_CXXFLAGS -D_DEBUG -DMEM_DEBUG" ;;
Thread
bk commit into 6.0 tree (jperkin:1.2619) BUG#34292Jonathan Perkin17 Apr