From f76ab0c46937a0d53ee0907c2a17daca6106c52a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 08:30:16 +0200 Subject: [PATCH 1/2] Deleted reject files accidently checked in configure.in.rej include/my_global.h.rej BUILD/SETUP.sh.rej mysys/thr_alarm.c.rej include/my_pthread.h.rej BitKeeper/deleted/.del-SETUP.sh.rej: Delete: BUILD/SETUP.sh.rej BitKeeper/deleted/.del-configure.in.rej: Delete: configure.in.rej BitKeeper/deleted/.del-my_global.h.rej: Delete: include/my_global.h.rej BitKeeper/deleted/.del-my_pthread.h.rej: Delete: include/my_pthread.h.rej BitKeeper/deleted/.del-thr_alarm.c.rej: Delete: mysys/thr_alarm.c.rej --- BUILD/SETUP.sh.rej | 19 --- configure.in.rej | 299 --------------------------------------- include/my_global.h.rej | 17 --- include/my_pthread.h.rej | 80 ----------- mysys/thr_alarm.c.rej | 220 ---------------------------- 5 files changed, 635 deletions(-) delete mode 100644 BUILD/SETUP.sh.rej delete mode 100644 configure.in.rej delete mode 100644 include/my_global.h.rej delete mode 100644 include/my_pthread.h.rej delete mode 100644 mysys/thr_alarm.c.rej diff --git a/BUILD/SETUP.sh.rej b/BUILD/SETUP.sh.rej deleted file mode 100644 index ccbcaa4404f..00000000000 --- a/BUILD/SETUP.sh.rej +++ /dev/null @@ -1,19 +0,0 @@ -*************** -*** 39,46 **** - c_warnings="$global_warnings -Wunused" - cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" - -! alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet -! pentium_cflags="-mcpu=pentiumpro" - sparc_cflags="" - - # be as fast as we can be without losing our ability to backtrace ---- 39,46 ---- - c_warnings="$global_warnings -Wunused" - cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" - -! #alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet -! #pentium_cflags="-mcpu=pentiumpro" - sparc_cflags="" - - # be as fast as we can be without losing our ability to backtrace diff --git a/configure.in.rej b/configure.in.rej deleted file mode 100644 index 46fbf83b198..00000000000 --- a/configure.in.rej +++ /dev/null @@ -1,299 +0,0 @@ -*************** -*** 388,402 **** - if expr "$target_os" : "[[Ll]]inux.*" > /dev/null - then - MYSQLD_DEFAULT_SWITCHES="--skip-locking" -! IS_LINUX="true" - AC_MSG_RESULT("yes"); - else - MYSQLD_DEFAULT_SWITCHES="" -! IS_LINUX="false" - AC_MSG_RESULT("no"); - fi - AC_SUBST(MYSQLD_DEFAULT_SWITCHES) -! AC_SUBST(IS_LINUX) - - dnl Find paths to some shell programs - AC_PATH_PROG(LN, ln, ln) ---- 388,403 ---- - if expr "$target_os" : "[[Ll]]inux.*" > /dev/null - then - MYSQLD_DEFAULT_SWITCHES="--skip-locking" -! TARGET_LINUX="true" - AC_MSG_RESULT("yes"); -+ AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) - else - MYSQLD_DEFAULT_SWITCHES="" -! TARGET_LINUX="false" - AC_MSG_RESULT("no"); - fi - AC_SUBST(MYSQLD_DEFAULT_SWITCHES) -! AC_SUBST(TARGET_LINUX) - - dnl Find paths to some shell programs - AC_PATH_PROG(LN, ln, ln) -*************** -*** 576,582 **** - # (this is true on the MySQL build machines to avoid NSS problems) - # - -! if test "$IS_LINUX" = "true" -a "$static_nss" = "" - then - tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r` - if test -n "$tmp" ---- 577,583 ---- - # (this is true on the MySQL build machines to avoid NSS problems) - # - -! if test "$TARGET_LINUX" = "true" -a "$static_nss" = "" - then - tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r` - if test -n "$tmp" -*************** -*** 827,833 **** - ]) - AC_SUBST(WRAPLIBS) - -! if test "$IS_LINUX" = "true"; then - AC_MSG_CHECKING([for atomic operations]) - - AC_LANG_SAVE ---- 828,834 ---- - ]) - AC_SUBST(WRAPLIBS) - -! if test "$TARGET_LINUX" = "true"; then - AC_MSG_CHECKING([for atomic operations]) - - AC_LANG_SAVE -*************** -*** 870,876 **** - [ USE_PSTACK=no ]) - pstack_libs= - pstack_dirs= -! if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no" - then - have_libiberty= have_libbfd= - my_save_LIBS="$LIBS" ---- 871,877 ---- - [ USE_PSTACK=no ]) - pstack_libs= - pstack_dirs= -! if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no" - then - have_libiberty= have_libbfd= - my_save_LIBS="$LIBS" -*************** -*** 1239,1301 **** - # Hack for DEC-UNIX (OSF1) - if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" - then -! # Look for LinuxThreads. -! AC_MSG_CHECKING("LinuxThreads") -! grepres=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` -! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep LINUXTHREADS | wc -l || echo 0` -! if test "$grepres" -gt 0 -o "$getconfres" -gt 0 - then -! AC_MSG_RESULT("Found") -! AC_DEFINE(HAVE_LINUXTHREADS) -! # Linux 2.0 sanity check -! AC_TRY_COMPILE([#include ], [int a = sched_get_priority_min(1);], , -! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual])) -! # RedHat 5.0 does not work with dynamic linking of this. -static also -! # gives a speed increase in linux so it does not hurt on other systems. -! with_named_thread="-lpthread" -! else -! AC_MSG_RESULT("Not found") -! # If this is a linux machine we should barf -! AC_MSG_CHECKING("NPTL") -! if test "$IS_LINUX" = "true" -! then -! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep NPTL | wc -l || echo 0` -! if test "$getconfres" -gt 0 - then -! AC_DEFINE(HAVE_LINUXTHREADS) dnl All this code predates NPTL, so "have linuxthreads" is a poor name. -! with_named_thread="-lpthread" - else -! AC_MSG_ERROR([This is a Linux system and neither Linuxthreads nor NPTL were -! found. Please install Linuxthreads or a new glibc and try -! again. See the Installation chapter in the Reference Manual for -! more information.]) - fi -! else -! AC_MSG_CHECKING("DEC threads") -! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a -! then -! with_named_thread="-lpthread -lmach -lexc" -! CFLAGS="$CFLAGS -D_REENTRANT" -! CXXFLAGS="$CXXFLAGS -D_REENTRANT" -! AC_DEFINE(HAVE_DEC_THREADS) -! AC_MSG_RESULT("yes") -! else -! AC_MSG_RESULT("no") -! AC_MSG_CHECKING("DEC 3.2 threads") -! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a -! then -! with_named_thread="-lpthreads -lmach -lc_r" -! AC_DEFINE(HAVE_DEC_THREADS) -! AC_DEFINE(HAVE_DEC_3_2_THREADS) -! with_osf32_threads="yes" -! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority" -! AC_MSG_RESULT("yes") -! else -! AC_MSG_RESULT("no") -! fi -! fi -! fi -! fi - fi - - ---- 1240,1337 ---- - # Hack for DEC-UNIX (OSF1) - if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" - then -! AC_MSG_CHECKING("Linux threads") -! if test "$TARGET_LINUX" = "true" - then -! AC_MSG_RESULT("starting") -! # use getconf to check glibc contents -! AC_MSG_CHECKING("getconf GNU_LIBPTHREAD_VERSION") -! case `getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` in -! NPTL* ) -! AC_MSG_RESULT("NPTL") -! AC_DEFINE([HAVE_NPTL], [1], [NPTL threads implementation]) -! with_named_thread="-lpthread" -! ;; -! LINUXTHREADS* ) -! AC_MSG_RESULT("Linuxthreads") -! AC_DEFINE([HAVE_LINUXTHREADS], [1], -! [Whether we are using Xavier Leroy's LinuxThreads]) -! with_named_thread="-lpthread" -! ;; -! * ) -! AC_MSG_RESULT("unknown") -! ;; -! esac -! if test "$with_named_thread" = "no" - then -! # old method, check headers -! # Look for LinuxThreads. -! AC_MSG_CHECKING("LinuxThreads in header file comment") -! res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` -! if test "$res" -gt 0 -! then -! AC_MSG_RESULT("Found") -! AC_DEFINE([HAVE_LINUXTHREADS], [1], -! [Whether we are using Xavier Leroy's LinuxThreads]) -! # Linux 2.0 sanity check -! AC_TRY_COMPILE([#include ], [int a = sched_get_priority_min(1);], , -! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual])) -! # RedHat 5.0 does not work with dynamic linking of this. -static also -! # gives a speed increase in linux so it does not hurt on other systems. -! with_named_thread="-lpthread" -! else -! AC_MSG_RESULT("Not found") -! # If this is a linux machine we should barf -! AC_MSG_ERROR([This is a Linux system without a working getconf, -! and Linuxthreads was not found. Please install it (or a new glibc) and try again. -! See the Installation chapter in the Reference Manual for more information.]) -! fi - else -! AC_MSG_RESULT("no need to check headers") - fi -! AC_MSG_CHECKING("for pthread_create in -lpthread"); -! ac_save_LIBS="$LIBS" -! LIBS="$LIBS -lpthread" -! AC_TRY_LINK( [#include ], -! [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], -! AC_MSG_RESULT("yes"), -! [ AC_MSG_RESULT("no") -! AC_MSG_ERROR([ -! This is a Linux system claiming to support threads, either Linuxthreads or NPTL, but linking a test program failed. -! Please install one of these (or a new glibc) and try again. -! See the Installation chapter in the Reference Manual for more information.]) ] -! ) -! LIBS="$ac_save_LIBS" -! else -! AC_MSG_RESULT("no") -! fi # "$TARGET_LINUX" -! fi # "$with_named_thread" = "no" -a "$with_mit_threads" = "no" -! -! if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" -! then -! AC_MSG_CHECKING("DEC threads") -! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a -! then -! with_named_thread="-lpthread -lmach -lexc" -! CFLAGS="$CFLAGS -D_REENTRANT" -! CXXFLAGS="$CXXFLAGS -D_REENTRANT" -! AC_DEFINE(HAVE_DEC_THREADS) -! AC_MSG_RESULT("yes") -! else -! AC_MSG_RESULT("no") -! AC_MSG_CHECKING("DEC 3.2 threads") -! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a -! then -! with_named_thread="-lpthreads -lmach -lc_r" -! AC_DEFINE(HAVE_DEC_THREADS) -! AC_DEFINE(HAVE_DEC_3_2_THREADS) -! with_osf32_threads="yes" -! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority" -! AC_MSG_RESULT("yes") -! else -! AC_MSG_RESULT("no") -! fi -! fi - fi - - -*************** -*** 1720,1726 **** - AC_SUBST(COMPILATION_COMMENT) - - AC_MSG_CHECKING("need of special linking flags") -! if test "$IS_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes" - then - LDFLAGS="$LDFLAGS -rdynamic" - AC_MSG_RESULT("-rdynamic") ---- 1756,1762 ---- - AC_SUBST(COMPILATION_COMMENT) - - AC_MSG_CHECKING("need of special linking flags") -! if test "$TARGET_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes" - then - LDFLAGS="$LDFLAGS -rdynamic" - AC_MSG_RESULT("-rdynamic") -*************** -*** 1873,1878 **** - tell atod memcpy memmove \ - setupterm strcasecmp sighold vidattr lrand48 localtime_r \ - sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \ - pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \ - pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \ - pthread_attr_getstacksize pthread_key_delete \ ---- 1909,1915 ---- - tell atod memcpy memmove \ - setupterm strcasecmp sighold vidattr lrand48 localtime_r \ - sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \ -+ sigaction sigemptyset sigaddset \ - pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \ - pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \ - pthread_attr_getstacksize pthread_key_delete \ -*************** -*** 1884,1890 **** - # Sanity check: We chould not have any fseeko symbol unless - # large_file_support=yes - AC_CHECK_FUNCS(fseeko, -! [if test "$large_file_support" = no -a "$IS_LINUX" = "true"; - then - AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!"); - fi] ---- 1921,1927 ---- - # Sanity check: We chould not have any fseeko symbol unless - # large_file_support=yes - AC_CHECK_FUNCS(fseeko, -! [if test "$large_file_support" = no -a "$TARGET_LINUX" = "true"; - then - AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!"); - fi] diff --git a/include/my_global.h.rej b/include/my_global.h.rej deleted file mode 100644 index f2953d169e7..00000000000 --- a/include/my_global.h.rej +++ /dev/null @@ -1,17 +0,0 @@ -*************** -*** 97,103 **** - - - /* Fix problem with S_ISLNK() on Linux */ -! #if defined(HAVE_LINUXTHREADS) - #undef _GNU_SOURCE - #define _GNU_SOURCE 1 - #endif ---- 97,103 ---- - - - /* Fix problem with S_ISLNK() on Linux */ -! #if defined(TARGET_OS_LINUX) || defined(__GLIBC__) - #undef _GNU_SOURCE - #define _GNU_SOURCE 1 - #endif diff --git a/include/my_pthread.h.rej b/include/my_pthread.h.rej deleted file mode 100644 index 1f73655b0bd..00000000000 --- a/include/my_pthread.h.rej +++ /dev/null @@ -1,80 +0,0 @@ -*************** -*** 286,293 **** - #undef HAVE_PTHREAD_RWLOCK_RDLOCK - #undef HAVE_SNPRINTF - -! #define sigset(A,B) pthread_signal((A),(void (*)(int)) (B)) -! #define signal(A,B) pthread_signal((A),(void (*)(int)) (B)) - #define my_pthread_attr_setprio(A,B) - #endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */ - ---- 294,301 ---- - #undef HAVE_PTHREAD_RWLOCK_RDLOCK - #undef HAVE_SNPRINTF - -! #define my_sigset(A,B) pthread_signal((A),(void (*)(int)) (B)) -! #define my_signal(A,B) pthread_signal((A),(void (*)(int)) (B)) - #define my_pthread_attr_setprio(A,B) - #endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */ - -*************** -*** 324,337 **** - #if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) - int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */ - #endif -! #if !defined(HAVE_SIGSET) && !defined(HAVE_mit_thread) && !defined(sigset) -! #define sigset(A,B) do { struct sigaction s; sigset_t set; \ -! sigemptyset(&set); \ -! s.sa_handler = (B); \ -! s.sa_mask = set; \ -! s.sa_flags = 0; \ -! sigaction((A), &s, (struct sigaction *) NULL); \ - } while (0) - #endif - - #ifndef my_pthread_setprio ---- 332,358 ---- - #if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) - int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */ - #endif -! -! /* -! We define my_sigset() and use that instead of the system sigset() so that -! we can favor an implementation based on sigaction(). On some systems, such -! as Mac OS X, sigset() results in flags such as SA_RESTART being set, and -! we want to make sure that no such flags are set. -! */ -! #if defined(HAVE_SIGACTION) && !defined(my_sigset) -! #define my_sigset(A,B) do { struct sigaction s; sigset_t set; int rc; \ -! DBUG_ASSERT((A) != 0); \ -! sigemptyset(&set); \ -! s.sa_handler = (B); \ -! s.sa_mask = set; \ -! s.sa_flags = 0; \ -! rc= sigaction((A), &s, (struct sigaction *) NULL); \ -! DBUG_ASSERT(rc == 0); \ - } while (0) -+ #elif defined(HAVE_SIGSET) && !defined(my_sigset) -+ #define my_sigset(A,B) sigset((A),(B)) -+ #elif !defined(my_sigset) -+ #define my_sigset(A,B) signal((A),(B)) - #endif - - #ifndef my_pthread_setprio -*************** -*** 416,422 **** - #undef pthread_detach_this_thread - #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); } - #undef sigset -! #define sigset(A,B) pthread_signal((A),(void (*)(int)) (B)) - #endif - - #if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER) ---- 437,443 ---- - #undef pthread_detach_this_thread - #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); } - #undef sigset -! #define my_sigset(A,B) pthread_signal((A),(void (*)(int)) (B)) - #endif - - #if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER) diff --git a/mysys/thr_alarm.c.rej b/mysys/thr_alarm.c.rej deleted file mode 100644 index c991121052e..00000000000 --- a/mysys/thr_alarm.c.rej +++ /dev/null @@ -1,220 +0,0 @@ -*************** -*** 76,96 **** - alarm_aborted=0; - init_queue(&alarm_queue,max_alarms+1,offsetof(ALARM,expire_time),0, - compare_ulong,NullS); -! sigfillset(&full_signal_set); /* Neaded to block signals */ - pthread_mutex_init(&LOCK_alarm,MY_MUTEX_INIT_FAST); - pthread_cond_init(&COND_alarm,NULL); -! #if THR_CLIENT_ALARM != SIGALRM || defined(USE_ALARM_THREAD) -! #if defined(HAVE_mit_thread) -! sigset(THR_CLIENT_ALARM,thread_alarm); /* int. thread system calls */ -! #else - { -! struct sigaction sact; -! sact.sa_flags = 0; -! sact.sa_handler = thread_alarm; -! sigaction(THR_CLIENT_ALARM, &sact, (struct sigaction*) 0); - } -- #endif -- #endif - sigemptyset(&s); - sigaddset(&s, THR_SERVER_ALARM); - alarm_thread=pthread_self(); ---- 74,89 ---- - alarm_aborted=0; - init_queue(&alarm_queue,max_alarms+1,offsetof(ALARM,expire_time),0, - compare_ulong,NullS); -! sigfillset(&full_signal_set); /* Needed to block signals */ - pthread_mutex_init(&LOCK_alarm,MY_MUTEX_INIT_FAST); - pthread_cond_init(&COND_alarm,NULL); -! #ifndef USE_ALARM_THREAD -! if (thd_lib_detected != THD_LIB_LT) -! #endif - { -! my_sigset(thd_lib_detected == THD_LIB_LT ? SIGALRM : SIGUSR1, -! thread_alarm); - } - sigemptyset(&s); - sigaddset(&s, THR_SERVER_ALARM); - alarm_thread=pthread_self(); -*************** -*** 108,120 **** - } - #elif defined(USE_ONE_SIGNAL_HAND) - pthread_sigmask(SIG_BLOCK, &s, NULL); /* used with sigwait() */ -! #if THR_SERVER_ALARM == THR_CLIENT_ALARM -! sigset(THR_CLIENT_ALARM,process_alarm); /* Linuxthreads */ -! pthread_sigmask(SIG_UNBLOCK, &s, NULL); -! #endif - #else - pthread_sigmask(SIG_UNBLOCK, &s, NULL); -- sigset(THR_SERVER_ALARM,process_alarm); - #endif - DBUG_VOID_RETURN; - } ---- 101,115 ---- - } - #elif defined(USE_ONE_SIGNAL_HAND) - pthread_sigmask(SIG_BLOCK, &s, NULL); /* used with sigwait() */ -! if (thd_lib_detected == THD_LIB_LT) -! { -! my_sigset(thd_lib_detected == THD_LIB_LT ? SIGALRM : SIGUSR1, -! process_alarm); /* Linuxthreads */ -! pthread_sigmask(SIG_UNBLOCK, &s, NULL); -! } - #else -+ my_sigset(THR_SERVER_ALARM, process_alarm); - pthread_sigmask(SIG_UNBLOCK, &s, NULL); - #endif - DBUG_VOID_RETURN; - } -*************** -*** 240,246 **** - if (alarm_data->malloced) - my_free((gptr) alarm_data,MYF(0)); - found++; -! #ifndef DBUG_OFF - break; - #endif - } ---- 235,241 ---- - if (alarm_data->malloced) - my_free((gptr) alarm_data,MYF(0)); - found++; -! #ifdef DBUG_OFF - break; - #endif - } -*************** -*** 249,258 **** - if (!found) - { - if (*alarmed) -! fprintf(stderr,"Warning: Didn't find alarm %lx in queue of %d alarms\n", -! (long) *alarmed, alarm_queue.elements); -! DBUG_PRINT("warning",("Didn't find alarm %lx in queue\n", -! (long) *alarmed)); - } - pthread_mutex_unlock(&LOCK_alarm); - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); ---- 244,254 ---- - if (!found) - { - if (*alarmed) -! fprintf(stderr, -! "Warning: Didn't find alarm 0x%lx in queue of %d alarms\n", -! (long) *alarmed, alarm_queue.elements); -! DBUG_PRINT("warning",("Didn't find alarm 0x%lx in queue\n", -! (long) *alarmed)); - } - pthread_mutex_unlock(&LOCK_alarm); - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -*************** -*** 274,291 **** - This must be first as we can't call DBUG inside an alarm for a normal thread - */ - -! #if THR_SERVER_ALARM == THR_CLIENT_ALARM -! if (!pthread_equal(pthread_self(),alarm_thread)) - { - #if defined(MAIN) && !defined(__bsdi__) -! printf("thread_alarm\n"); fflush(stdout); - #endif - #ifdef DONT_REMEMBER_SIGNAL -! sigset(THR_CLIENT_ALARM,process_alarm); /* int. thread system calls */ - #endif - return; - } -- #endif - - /* - We have to do do the handling of the alarm in a sub function, ---- 270,287 ---- - This must be first as we can't call DBUG inside an alarm for a normal thread - */ - -! if (thd_lib_detected == THD_LIB_LT && -! !pthread_equal(pthread_self(),alarm_thread)) - { - #if defined(MAIN) && !defined(__bsdi__) -! printf("thread_alarm in process_alarm\n"); fflush(stdout); - #endif - #ifdef DONT_REMEMBER_SIGNAL -! my_sigset(thd_lib_detected == THD_LIB_LT ? SIGALRM : SIGUSR1, -! process_alarm); /* int. thread system calls */ - #endif - return; - } - - /* - We have to do do the handling of the alarm in a sub function, -*************** -*** 301,307 **** - process_alarm_part2(sig); - #ifndef USE_ALARM_THREAD - #if defined(DONT_REMEMBER_SIGNAL) && !defined(USE_ONE_SIGNAL_HAND) -! sigset(THR_SERVER_ALARM,process_alarm); - #endif - pthread_mutex_unlock(&LOCK_alarm); - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); ---- 297,303 ---- - process_alarm_part2(sig); - #ifndef USE_ALARM_THREAD - #if defined(DONT_REMEMBER_SIGNAL) && !defined(USE_ONE_SIGNAL_HAND) -! my_sigset(THR_SERVER_ALARM, process_alarm); - #endif - pthread_mutex_unlock(&LOCK_alarm); - pthread_sigmask(SIG_SETMASK,&old_mask,NULL); -*************** -*** 504,520 **** - ARGSUSED - */ - -- #if THR_CLIENT_ALARM != SIGALRM || defined(USE_ALARM_THREAD) - static sig_handler thread_alarm(int sig) - { - #ifdef MAIN - printf("thread_alarm\n"); fflush(stdout); - #endif - #ifdef DONT_REMEMBER_SIGNAL -! sigset(sig,thread_alarm); /* int. thread system calls */ - #endif - } -- #endif - - - #ifdef HAVE_TIMESPEC_TS_SEC ---- 499,513 ---- - ARGSUSED - */ - - static sig_handler thread_alarm(int sig) - { - #ifdef MAIN - printf("thread_alarm\n"); fflush(stdout); - #endif - #ifdef DONT_REMEMBER_SIGNAL -! my_sigset(sig, thread_alarm); /* int. thread system calls */ - #endif - } - - - #ifdef HAVE_TIMESPEC_TS_SEC -*************** -*** 915,921 **** - printf("Warning: Got signal %d from thread %s\n",sig,my_thread_name()); - fflush(stdout); - #ifdef DONT_REMEMBER_SIGNAL -! sigset(sig,print_signal_warning); /* int. thread system calls */ - #endif - #ifndef OS2 - if (sig == SIGALRM) ---- 908,914 ---- - printf("Warning: Got signal %d from thread %s\n",sig,my_thread_name()); - fflush(stdout); - #ifdef DONT_REMEMBER_SIGNAL -! my_sigset(sig, print_signal_warning); /* int. thread system calls */ - #endif - #ifndef OS2 - if (sig == SIGALRM) From 60289fba0ba697e2bbab6136e7840216bea0633d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 08:36:56 +0200 Subject: [PATCH 2/2] zlib.m4: Only require the more recent zlibCompileFlags() when building the server, client zlib don't need it. Makefile.am: Always build the bundled zlib static only configure.in: Look for dlopen() even if --with-mysqld-ldflags constains "-static", as this is not the same as the flag to "ld", it just informs "libtool" to link static with libraries created part of the build, even if there exists shared versions. make_binary_distribution.sh: Real "mysqlmanager" executable might be in ".libs" configure.in: Look for dlopen() even if --with-mysqld-ldflags constains "-static", as this is not the same as the flag to "ld", it just informs "libtool" to link static with libraries created part of the build, even if there exists shared versions. config/ac-macros/zlib.m4: Only require the more recent zlibCompileFlags() when building the server, client zlib don't need it. scripts/make_binary_distribution.sh: Real "mysqlmanager" executable might be in ".libs" zlib/Makefile.am: Always build the bundled zlib static only --- config/ac-macros/zlib.m4 | 13 +++++++++++-- configure.in | 4 ++-- scripts/make_binary_distribution.sh | 8 +++++++- zlib/Makefile.am | 3 ++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4 index a01d13937ff..74de715e424 100644 --- a/config/ac-macros/zlib.m4 +++ b/config/ac-macros/zlib.m4 @@ -10,16 +10,25 @@ AC_SUBST([zlib_dir]) mysql_cv_compress="yes" ]) -dnl Auxiliary macro to check for zlib at given path +dnl Auxiliary macro to check for zlib at given path. +dnl We are strict with the server, as "archive" engine +dnl needs zlibCompileFlags(), but for client only we +dnl are less strict, and take the zlib we find. AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [ save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS" LIBS="$LIBS $ZLIB_LIBS" +if test X"$with_server" = Xno +then + zlibsym=zlibVersion +else + zlibsym=zlibCompileFlags +fi AC_CACHE_VAL([mysql_cv_compress], [AC_TRY_LINK([#include ], - [return zlibCompileFlags();], + [return $zlibsym();], [mysql_cv_compress="yes" AC_MSG_RESULT([ok])], [mysql_cv_compress="no"]) diff --git a/configure.in b/configure.in index 9b0505a594f..bcf561c02ef 100644 --- a/configure.in +++ b/configure.in @@ -1601,9 +1601,9 @@ fi # dlopen, dlerror case "$with_mysqld_ldflags " in - *"-static "*) + *"-all-static "*) # No need to check for dlopen when mysqld is linked with - # -all-static or -static as it won't be able to load any functions. + # -all-static as it won't be able to load any functions. # NOTE! It would be better if it was possible to test if dlopen # can be used, but a good way to test it couldn't be found diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 7d7918975f2..e8bf39bd016 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -115,7 +115,12 @@ if [ $BASE_SYSTEM != "netware" ] ; then chmod o-rwx $BASE/data $BASE/data/* fi -# Copy files if they exists, warn for those that don't +# Copy files if they exists, warn for those that don't. +# Note that when listing files to copy, we might list the file name +# twice, once in the directory location where it is build, and a +# second time in the ".libs" location. In the case the firs one +# is a wrapper script, the second one will overwrite it with the +# binary file. copyfileto() { destdir=$1 @@ -165,6 +170,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then # For all other platforms: else BIN_FILES="$BIN_FILES \ + server-tools/instance-manager/.libs/mysqlmanager \ client/mysqltestmanagerc \ client/mysqltestmanager-pwgen tools/mysqltestmanager \ client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin \ diff --git a/zlib/Makefile.am b/zlib/Makefile.am index c40c922851e..f5741a782fb 100644 --- a/zlib/Makefile.am +++ b/zlib/Makefile.am @@ -21,7 +21,8 @@ LIBS= $(NON_THREADED_LIBS) pkglib_LTLIBRARIES=libz.la -libz_la_LDFLAGS= -version-info 3:3:2 +# We are never interested in a shared version +libz_la_LDFLAGS= -static noinst_HEADERS= crc32.h deflate.h inffast.h inffixed.h inflate.h \ inftrees.h trees.h zconf.h zlib.h zutil.h