Commit 4b943136 authored by unknown's avatar unknown
Browse files

Fix build using --without-server. (Bug #11680)


configure.in:
  Fix directories built using --without-server, and add mf_keycache.o
  to list of objects only built for thread-safe library, since it requires
  threading.
dbug/my_main.c:
  Don't try to initialize thread globals if not built with threading.
mysys/Makefile.am:
  Remove mf_keycache.c from list of files to build (it will be included
  in THREAD_LOBJECTS when appropriate).
mysys/mf_getdate.c:
  Fix usage of gmtime().
sql/share/Makefile.am:
  Allow removal of mysqld_error.h to fail, in case it doesn't exist yet.
tests/Makefile.am:
  Don't link against libmysys explicitly.
parent 4eccc160
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2444,7 +2444,7 @@ thread_dirs=

dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
sql_client_dirs="libmysql strings regex client"
sql_client_dirs="strings regex mysys sql/share libmysql client"
linked_client_targets="linked_libmysql_sources"

if test "$THREAD_SAFE_CLIENT" != "no"
@@ -2482,10 +2482,10 @@ then
  AC_DEFINE([THREAD], [1],
            [Define if you want to have threaded code. This may be undef on client code])
  # Avoid _PROGRAMS names
  THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o"
  THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o mf_keycache.o"
  AC_SUBST(THREAD_LOBJECTS)
  server_scripts="mysqld_safe mysql_install_db"
  sql_server_dirs="strings mysys dbug extra regex"
  sql_server_dirs="strings dbug extra regex"


  #
@@ -2593,7 +2593,6 @@ esac
  # END of configuration for optional table handlers
  #
  sql_server_dirs="$sql_server_dirs myisam myisammrg heap vio sql"

fi

# IMPORTANT - do not modify LIBS past this line - this hack is the only way
+2 −0
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@ char *argv[];
#if defined(HAVE_PTHREAD_INIT) && defined(THREAD)
  pthread_init();			/* Must be called before DBUG_ENTER */
#endif
#ifdef THREAD
  my_thread_global_init();
#endif
  {
    DBUG_ENTER ("main");
    DBUG_PROCESS (argv[0]);
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
			mf_path.c mf_loadpath.c my_file.c \
			my_open.c my_create.c my_dup.c my_seek.c my_read.c \
			my_pread.c my_write.c \
			mf_keycache.c mf_keycaches.c my_crc32.c \
			mf_keycaches.c my_crc32.c \
			mf_iocache.c mf_iocache2.c mf_cache.c mf_tempfile.c \
			mf_tempdir.c my_lock.c mf_brkhant.c my_alarm.c \
			my_malloc.c my_realloc.c my_once.c mulalloc.c \
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ void get_date(register my_string to, int flag, time_t date)
   if (flag & GETDATE_GMT)
     start_time= localtime(&skr);
   else
     gmtime(&skr,&tm_tmp);
     start_time= gmtime(&skr);
#endif
   if (flag & GETDATE_SHORT_DATE)
     sprintf(to,"%02d%02d%02d",
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ all-local: english/errmsg.sys
# created. Normally these are created by extra/Makefile

english/errmsg.sys: errmsg.txt
	rm $(top_builddir)/include/mysqld_error.h
	rm -f $(top_builddir)/include/mysqld_error.h
	(cd $(top_builddir)/extra && $(MAKE))

install-data-local:
Loading