From 519ebab04edcbda779d304db7f7889f106ee9782 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/kent-amd64.(none)" <> Date: Fri, 27 Jul 2007 17:39:07 +0200 Subject: [PATCH 1/3] SSL/Makefile.am mysql-test/Makefile.am: Moved CERT files to where they are used, avoids conflict between two make files trying to install the same CERTs SSL/*.pem, Move: SSL/*.pem -> mysql-test/std_data/ --- SSL/Makefile.am | 4 +--- mysql-test/Makefile.am | 18 +----------------- {SSL => mysql-test/std_data}/cacert.pem | 0 {SSL => mysql-test/std_data}/client-cert.pem | 0 {SSL => mysql-test/std_data}/client-key.pem | 0 {SSL => mysql-test/std_data}/server-cert.pem | 0 {SSL => mysql-test/std_data}/server-key.pem | 0 7 files changed, 2 insertions(+), 20 deletions(-) rename {SSL => mysql-test/std_data}/cacert.pem (100%) rename {SSL => mysql-test/std_data}/client-cert.pem (100%) rename {SSL => mysql-test/std_data}/client-key.pem (100%) rename {SSL => mysql-test/std_data}/server-cert.pem (100%) rename {SSL => mysql-test/std_data}/server-key.pem (100%) diff --git a/SSL/Makefile.am b/SSL/Makefile.am index 5fc44d3a247..30a6fc3c995 100644 --- a/SSL/Makefile.am +++ b/SSL/Makefile.am @@ -15,9 +15,7 @@ ## Process this file with automake to create Makefile.in -EXTRA_DIST= NOTES cacert.pem client-cert.pem client-key.pem \ - run-client run-server server-cert.pem \ - server-key.pem +EXTRA_DIST= NOTES run-client run-server # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 1920a68b21b..439b13af779 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -37,12 +37,7 @@ EXTRA_DIST = $(EXTRA_SCRIPTS) suite GENSCRIPTS = mysql-test-run-shell mysql-test-run install_test_db mtr PRESCRIPTS = mysql-test-run.pl mysql-stress-test.pl test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) -test_DATA = std_data/client-key.pem \ - std_data/client-cert.pem \ - std_data/cacert.pem \ - std_data/server-cert.pem \ - std_data/server-key.pem -CLEANFILES = $(GENSCRIPTS) $(test_DATA) +CLEANFILES = $(GENSCRIPTS) INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I.. @@ -111,17 +106,6 @@ install-data-local: uninstall-local: @RM@ -f -r $(DESTDIR)$(testdir) -std_data/client-key.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/client-cert.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/cacert.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/server-cert.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/server-key.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data - # mtr - a shortcut for executing mysql-test-run.pl mtr: $(RM) -f mtr diff --git a/SSL/cacert.pem b/mysql-test/std_data/cacert.pem similarity index 100% rename from SSL/cacert.pem rename to mysql-test/std_data/cacert.pem diff --git a/SSL/client-cert.pem b/mysql-test/std_data/client-cert.pem similarity index 100% rename from SSL/client-cert.pem rename to mysql-test/std_data/client-cert.pem diff --git a/SSL/client-key.pem b/mysql-test/std_data/client-key.pem similarity index 100% rename from SSL/client-key.pem rename to mysql-test/std_data/client-key.pem diff --git a/SSL/server-cert.pem b/mysql-test/std_data/server-cert.pem similarity index 100% rename from SSL/server-cert.pem rename to mysql-test/std_data/server-cert.pem diff --git a/SSL/server-key.pem b/mysql-test/std_data/server-key.pem similarity index 100% rename from SSL/server-key.pem rename to mysql-test/std_data/server-key.pem From e99df6fd02fff7a06d7b5ed02b2a58378d88d27e Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/kent-amd64.(none)" <> Date: Mon, 30 Jul 2007 20:40:49 +0200 Subject: [PATCH 2/3] my_pthread.c: Backport of correction for Mac OS X build problem, global variable not initiated is "common" and can't be used in shared libraries, unless special flags are used (bug#26218) --- mysys/my_pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 14ba6aabf0e..50c0a82d2d8 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -30,7 +30,7 @@ #define SCHED_POLICY SCHED_OTHER #endif -uint thd_lib_detected; +uint thd_lib_detected= 0; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) From a9d2569cba4ff0e9c419d26d4e2005337e047984 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/kent-amd64.(none)" <> Date: Mon, 30 Jul 2007 21:09:45 +0200 Subject: [PATCH 3/3] Generate "config.h" directly into the "include" directory, later copied to "my_config.h". Not to pollute the top directory, and to get more control over what is included. Made the include path for "libedit" pick up its own "config.h" first. --- cmd-line-utils/libedit/Makefile.am | 4 ++-- config/ac-macros/misc.m4 | 1 - configure.in | 2 +- include/Makefile.am | 7 +++++-- scripts/make_binary_distribution.sh | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd-line-utils/libedit/Makefile.am b/cmd-line-utils/libedit/Makefile.am index ae6755f1c5c..b7611193aea 100644 --- a/cmd-line-utils/libedit/Makefile.am +++ b/cmd-line-utils/libedit/Makefile.am @@ -5,8 +5,8 @@ ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c AHDR = vi.h emacs.h common.h -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(srcdir)/../.. -I.. +# Make sure to include stuff from this directory first, to get right "config.h" +INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include noinst_LIBRARIES = libedit.a diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index 09081fb3eac..60c0469e449 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -763,7 +763,6 @@ AC_SUBST(CXX_VERSION) ]) AC_DEFUN([MYSQL_PROG_AR], [ -AC_REQUIRE([MYSQL_CHECK_CXX_VERSION]) case $CXX_VERSION in MIPSpro*) AR=$CXX diff --git a/configure.in b/configure.in index 843837b9348..3db6d0bfb8d 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb AM_INIT_AUTOMAKE(mysql, 5.0.48) -AM_CONFIG_HEADER(config.h) +AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 DOT_FRM_VERSION=6 diff --git a/include/Makefile.am b/include/Makefile.am index 2cd72052a15..c856b6398fe 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -49,8 +49,11 @@ link_sources: @readline_h_ln_cmd@ @yassl_h_ln_cmd@ -my_config.h: ../config.h - $(CP) ../config.h my_config.h +# We want both "my_config.h" and "config.h" that are identical, as +# MySQL sources assumes the name "my_config.h", and 3rd party sources +# assumes the name "config.h". +my_config.h: config.h + $(CP) config.h my_config.h # These files should not be included in distributions since they are # generated by configure from the .h.in files diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index dab1bbec956..a87bb03526d 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -257,7 +257,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then rm -f $BASE/lib/*.la fi -copyfileto $BASE/include config.h include/* +copyfileto $BASE/include include/* rm -f $BASE/include/Makefile* $BASE/include/*.in $BASE/include/config-win.h if [ $BASE_SYSTEM != "netware" ] ; then