summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
commit76f0b94bb0b2994d639353530c5b251d0f1a204b (patch)
tree9ed50628aac34f89a37637bab2fc4915b86b5eb4 /extra
parent4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff)
parent5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff)
downloadmariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz
merge with 5.3
sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
Diffstat (limited to 'extra')
-rw-r--r--extra/CMakeLists.txt33
-rw-r--r--extra/comp_err.c86
-rw-r--r--extra/libevent/CMakeLists.txt12
-rw-r--r--extra/libevent/devpoll.c2
-rw-r--r--extra/libevent/epoll.c4
-rw-r--r--extra/libevent/evbuffer.c6
-rw-r--r--extra/libevent/event.c2
-rw-r--r--extra/libevent/kqueue.c9
-rw-r--r--extra/libevent/signal.c5
-rw-r--r--extra/my_print_defaults.c2
-rw-r--r--extra/replace.c2
-rw-r--r--extra/yassl/src/buffer.cpp3
-rw-r--r--extra/yassl/src/yassl_error.cpp2
-rw-r--r--extra/yassl/taocrypt/benchmark/benchmark.cpp22
-rw-r--r--extra/yassl/taocrypt/include/file.hpp2
-rw-r--r--extra/yassl/taocrypt/src/file.cpp4
-rw-r--r--extra/yassl/taocrypt/test/test.cpp22
17 files changed, 135 insertions, 83 deletions
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index 61c3e62440a..a079287f6b2 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -31,24 +31,28 @@ IF(NOT CMAKE_CROSSCOMPILING)
TARGET_LINK_LIBRARIES(comp_err mysys)
ENDIF()
-ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h
- ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys
- COMMAND comp_err
- --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
- --out-dir=${PROJECT_BINARY_DIR}/sql/share/
- --header_file=${PROJECT_BINARY_DIR}/include/mysqld_error.h
- --name_file=${PROJECT_BINARY_DIR}/include/mysqld_ername.h
- --state_file=${PROJECT_BINARY_DIR}/include/sql_state.h
- --in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt
- DEPENDS ${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/comp_err.c)
+# Generate mysqld_error.h
+# Try not to change its timestamp if not necessary(as touching
+# mysqld_error.h results in rebuild of the almost whole server)
+# To preserve timestamp, first generate a temp header file, then copy it
+# to mysqld_error.h using cmake -E copy_if_different
+ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp
+ COMMAND comp_err
+ --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
+ --out-dir=${CMAKE_BINARY_DIR}/sql/share/
+ --header_file=${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp
+ --name_file=${CMAKE_BINARY_DIR}/include/mysqld_ername.h.tmp
+ --state_file=${CMAKE_BINARY_DIR}/include/sql_state.h.tmp
+ --in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp ${CMAKE_BINARY_DIR}/include/mysqld_error.h
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/mysqld_ername.h.tmp ${CMAKE_BINARY_DIR}/include/mysqld_ername.h
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/sql_state.h.tmp ${CMAKE_BINARY_DIR}/include/sql_state.h
+ DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt)
ADD_CUSTOM_TARGET(GenError
ALL
DEPENDS
- ${PROJECT_BINARY_DIR}/include/mysqld_error.h
- ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys
- ${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt)
+ ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp)
MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
TARGET_LINK_LIBRARIES(my_print_defaults mysys)
@@ -77,4 +81,3 @@ IF(UNIX)
MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c)
TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
ENDIF()
-
diff --git a/extra/comp_err.c b/extra/comp_err.c
index c3d8f8ac01b..f1159232087 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -34,6 +34,7 @@
#define HEADER_LENGTH 32 /* Length of header in errmsg.sys */
#define DEFAULT_CHARSET_DIR "../sql/share/charsets"
#define ER_PREFIX "ER_"
+#define ER_PREFIX2 "MARIA_ER_"
#define WARN_PREFIX "WARN_"
static char *OUTFILE= (char*) "errmsg.sys";
static char *HEADERFILE= (char*) "mysqld_error.h";
@@ -57,7 +58,7 @@ const char *empty_string= ""; /* For empty states */
*/
const char *default_language= "eng";
-int er_offset= 1000;
+uint er_offset= 1000;
my_bool info_flag= 0;
/* Storage of one error message row (for one language) */
@@ -85,7 +86,7 @@ struct languages
struct errors
{
const char *er_name; /* Name of the error (ER_HASHCK) */
- int d_code; /* Error code number */
+ uint d_code; /* Error code number */
const char *sql_code1; /* sql state */
const char *sql_code2; /* ODBC state */
struct errors *next_error; /* Pointer to next error */
@@ -127,6 +128,7 @@ static struct my_option my_long_options[]=
};
+static struct errors *generate_empty_message(uint dcode);
static struct languages *parse_charset_string(char *str);
static struct errors *parse_error_string(char *ptr, int er_count);
static struct message *parse_message_string(struct message *new_message,
@@ -225,7 +227,7 @@ static int create_header_files(struct errors *error_head)
struct errors *tmp_error;
struct message *er_msg;
const char *er_text;
-
+ uint current_d_code;
DBUG_ENTER("create_header_files");
if (!(er_definef= my_fopen(HEADERFILE, O_WRONLY, MYF(MY_WME))))
@@ -250,13 +252,22 @@ static int create_header_files(struct errors *error_head)
fprintf(er_definef, "#define ER_ERROR_FIRST %d\n", error_head->d_code);
+ current_d_code= error_head->d_code -1;
for (tmp_error= error_head; tmp_error; tmp_error= tmp_error->next_error)
{
/*
generating mysqld_error.h
fprintf() will automatically add \r on windows
*/
- fprintf(er_definef, "#define %s %d\n", tmp_error->er_name,
+
+ if (!tmp_error->er_name)
+ continue; /* Placeholder for gap */
+
+ if (tmp_error->d_code > current_d_code + 1)
+ fprintf(er_definef, "\n/* New section */\n\n");
+ current_d_code= tmp_error->d_code;
+
+ fprintf(er_definef, "#define %s %u\n", tmp_error->er_name,
tmp_error->d_code);
er_last= tmp_error->d_code;
@@ -428,7 +439,8 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
char *str, buff[1000];
struct errors *current_error= 0, **tail_error= top_error;
struct message current_message;
- int rcount= 0;
+ uint rcount= 0;
+ my_bool er_offset_found= 0;
DBUG_ENTER("parse_input_file");
*top_error= 0;
@@ -449,11 +461,32 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
}
if (is_prefix(str, "start-error-number"))
{
- if (!(er_offset= parse_error_offset(str)))
+ uint tmp_er_offset;
+ if (!(tmp_er_offset= parse_error_offset(str)))
{
fprintf(stderr, "Failed to parse the error offset string!\n");
DBUG_RETURN(0);
}
+ if (!er_offset_found)
+ {
+ er_offset_found= 1;
+ er_offset= tmp_er_offset;
+ }
+ else
+ {
+ /* Create empty error messages between er_offset and tmp_err_offset */
+ if (tmp_er_offset < er_offset + rcount)
+ {
+ fprintf(stderr, "new start-error-number %u is smaller than current error message: %u\n", tmp_er_offset, er_offset + rcount);
+ DBUG_RETURN(0);
+ }
+ for ( ; er_offset + rcount < tmp_er_offset ; rcount++)
+ {
+ current_error= generate_empty_message(er_offset + rcount);
+ *tail_error= current_error;
+ tail_error= &current_error->next_error;
+ }
+ }
continue;
}
if (is_prefix(str, "default-language"))
@@ -500,7 +533,8 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
DBUG_RETURN(0);
continue;
}
- if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX))
+ if (is_prefix(str, ER_PREFIX) || is_prefix(str, WARN_PREFIX) ||
+ is_prefix(str, ER_PREFIX2))
{
if (!(current_error= parse_error_string(str, rcount)))
{
@@ -515,12 +549,12 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
continue;
}
if (*str == '#' || *str == '\n')
- continue; /* skip comment or empty lines */
+ continue; /* skip comment or empty lines */
fprintf(stderr, "Wrong input file format. Stop!\nLine: %s\n", str);
DBUG_RETURN(0);
}
- *tail_error= 0; /* Mark end of list */
+ *tail_error= 0; /* Mark end of list */
my_fclose(file, MYF(0));
DBUG_RETURN(rcount);
@@ -629,7 +663,6 @@ static struct message *find_message(struct errors *err, const char *lang,
DBUG_RETURN(tmp);
if (!strcmp(tmp->lang_short_name, default_language))
{
- DBUG_ASSERT(tmp->text[0] != 0);
return_val= tmp;
}
}
@@ -849,6 +882,33 @@ static struct message *parse_message_string(struct message *new_message,
}
+static struct errors *generate_empty_message(uint d_code)
+{
+ struct errors *new_error;
+ struct message message;
+
+ /* create a new element */
+ if (!(new_error= (struct errors *) my_malloc(sizeof(*new_error),
+ MYF(MY_WME))))
+ return(0);
+ if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 1))
+ return(0); /* OOM: Fatal error */
+
+ new_error->er_name= NULL;
+ new_error->d_code= d_code;
+ new_error->sql_code1= empty_string;
+ new_error->sql_code2= empty_string;
+
+ if (!(message.lang_short_name= my_strdup(default_language, MYF(MY_WME))) ||
+ !(message.text= my_strdup("", MYF(MY_WME))))
+ return(0);
+
+ /* Can't fail as msg is preallocated */
+ (void) insert_dynamic(&new_error->msg, (uchar*) &message);
+ return(new_error);
+}
+
+
/*
Parsing the string with error name and codes; returns the pointer to
the errors struct
@@ -861,7 +921,9 @@ static struct errors *parse_error_string(char *str, int er_count)
DBUG_PRINT("enter", ("str: %s", str));
/* create a new element */
- new_error= (struct errors *) my_malloc(sizeof(*new_error), MYF(MY_WME));
+ if (!(new_error= (struct errors *) my_malloc(sizeof(*new_error),
+ MYF(MY_WME))))
+ DBUG_RETURN(0);
if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0))
DBUG_RETURN(0); /* OOM: Fatal error */
@@ -991,7 +1053,7 @@ static struct languages *parse_charset_string(char *str)
static void print_version(void)
{
DBUG_ENTER("print_version");
- printf("%s (Compile errormessage) Ver %s\n", my_progname, "2.0");
+ printf("%s (Compile errormessage) Ver %s\n", my_progname, "3.0");
DBUG_VOID_RETURN;
}
diff --git a/extra/libevent/CMakeLists.txt b/extra/libevent/CMakeLists.txt
index 83a6cf0f220..6be15641d3e 100644
--- a/extra/libevent/CMakeLists.txt
+++ b/extra/libevent/CMakeLists.txt
@@ -2,7 +2,9 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/extra/libevent
${CMAKE_SOURCE_DIR}/extra/libevent/compat
${CMAKE_SOURCE_DIR}/extra/libevent/WIN32-Code
- ${CMAKE_SOURCE_DIR}/include)
+ ${CMAKE_BINARY_DIR}/extra/libevent
+ ${CMAKE_SOURCE_DIR}/include
+)
IF(MSVC)
ADD_DEFINITIONS("-DWIN32 -DHAVE_CONFIG_H")
@@ -28,8 +30,14 @@ SET(LIBEVENT_SOURCES
min_heap.h
strlcpy-internal.h
)
+IF(WIN32)
+ # Workaround source distribution bug, remove preconfigured event-config
+ IF(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
+ FILE(REMOVE ${CMAKE_SOURCE_DIR}/extra/libevent/event-config.h)
+ ENDIF()
+ CONFIGURE_FILE(WIN32-Code/config.h ${CMAKE_BINARY_DIR}/extra/libevent/event-config.h COPYONLY)
+ENDIF()
-CONFIGURE_FILE(WIN32-Code/config.h ${CMAKE_SOURCE_DIR}/extra/libevent/event-config.h COPYONLY)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(libevent ${LIBEVENT_SOURCES})
ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/extra/libevent/devpoll.c b/extra/libevent/devpoll.c
index 82427c9e229..3a3ec7e64a8 100644
--- a/extra/libevent/devpoll.c
+++ b/extra/libevent/devpoll.c
@@ -185,7 +185,7 @@ devpoll_init(struct event_base *base)
}
static int
-devpoll_recalc(struct event_base *base, void *arg, int max)
+devpoll_recalc(struct event_base *base __attribute__((unused)), void *arg, int max)
{
struct devpollop *devpollop = arg;
diff --git a/extra/libevent/epoll.c b/extra/libevent/epoll.c
index 7c8c60bdffa..93ed5b83aa4 100644
--- a/extra/libevent/epoll.c
+++ b/extra/libevent/epoll.c
@@ -155,8 +155,8 @@ epoll_init(struct event_base *base)
}
static int
-epoll_recalc(struct event_base *base __attribute__((unused)),
- void *arg, int max)
+epoll_recalc(struct event_base *base __attribute__((unused)), void *arg,
+ int max)
{
struct epollop *epollop = arg;
diff --git a/extra/libevent/evbuffer.c b/extra/libevent/evbuffer.c
index 432d75d1c53..97dc40c0e41 100644
--- a/extra/libevent/evbuffer.c
+++ b/extra/libevent/evbuffer.c
@@ -75,8 +75,10 @@ bufferevent_add(struct event *ev, int timeout)
*/
void
-bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old __attribute__((unused)), size_t now,
- void *arg) {
+bufferevent_read_pressure_cb(struct evbuffer *buf,
+ size_t old __attribute__((unused)), size_t now,
+ void *arg)
+{
struct bufferevent *bufev = arg;
/*
* If we are below the watermark then reschedule reading if it's
diff --git a/extra/libevent/event.c b/extra/libevent/event.c
index 2042c2de626..07498c709c8 100644
--- a/extra/libevent/event.c
+++ b/extra/libevent/event.c
@@ -405,7 +405,7 @@ event_loopexit_cb(int fd __attribute__((unused)),
int
event_loopexit(struct timeval *tv)
{
- return (event_once(-1, EV_TIMEOUT, event_loopexit_cb,
+ return (event_once(-1, EV_TIMEOUT, &event_loopexit_cb,
current_base, tv));
}
diff --git a/extra/libevent/kqueue.c b/extra/libevent/kqueue.c
index eec5a6ab6fb..763236e40ac 100644
--- a/extra/libevent/kqueue.c
+++ b/extra/libevent/kqueue.c
@@ -95,7 +95,7 @@ const struct eventop kqops = {
};
static void *
-kq_init(struct event_base *base)
+kq_init(struct event_base *base __attribute__((unused)))
{
int kq;
struct kqop *kqueueop;
@@ -203,13 +203,14 @@ kq_insert(struct kqop *kqop, struct kevent *kev)
}
static void
-kq_sighandler(int sig)
+kq_sighandler(int sig __attribute__((unused)))
{
/* Do nothing here */
}
static int
-kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
+kq_dispatch(struct event_base *base __attribute__((unused)), void *arg,
+ struct timeval *tv)
{
struct kqop *kqop = arg;
struct kevent *changes = kqop->changes;
@@ -408,7 +409,7 @@ kq_del(void *arg, struct event *ev)
}
static void
-kq_dealloc(struct event_base *base, void *arg)
+kq_dealloc(struct event_base *base __attribute__((unused)), void *arg)
{
struct kqop *kqop = arg;
diff --git a/extra/libevent/signal.c b/extra/libevent/signal.c
index 5eb9d3c606e..ce164f2f5ea 100644
--- a/extra/libevent/signal.c
+++ b/extra/libevent/signal.c
@@ -69,7 +69,8 @@ static void evsignal_handler(int sig);
/* Callback for when the signal handler write a byte to our signaling socket */
static void
-evsignal_cb(int fd, short what __attribute__((unused)), void *arg __attribute__((unused)))
+evsignal_cb(int fd, short what __attribute__((unused)),
+ void *arg __attribute__((unused)))
{
static char signals[100];
#ifdef WIN32
@@ -113,7 +114,7 @@ evsignal_init(struct event_base *base)
evutil_make_socket_nonblocking(base->sig.ev_signal_pair[0]);
event_set(&base->sig.ev_signal, base->sig.ev_signal_pair[1],
- EV_READ | EV_PERSIST, evsignal_cb, &base->sig.ev_signal);
+ EV_READ | EV_PERSIST, &evsignal_cb, &base->sig.ev_signal);
base->sig.ev_signal.ev_base = base;
base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL;
}
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index 6b86503b29e..3f172a11042 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -101,7 +101,7 @@ static void usage(my_bool version)
my_print_help(my_long_options);
my_print_default_files(config_file);
my_print_variables(my_long_options);
- printf("\nExample usage:\n%s --defaults-file=example.cnf client mysql\n", my_progname);
+ printf("\nExample usage:\n%s --defaults-file=example.cnf client client-server mysql\n", my_progname);
}
diff --git a/extra/replace.c b/extra/replace.c
index 595594e75be..1afc373ef38 100644
--- a/extra/replace.c
+++ b/extra/replace.c
@@ -1086,7 +1086,7 @@ static int convert_file(REPLACE *rep, char * name)
my_fclose(in,MYF(0)); my_fclose(out,MYF(0));
if (updated && ! error)
- my_redel(org_name,tempname,MYF(MY_WME | MY_LINK_WARNING));
+ my_redel(org_name, tempname, 0, MYF(MY_WME | MY_LINK_WARNING));
else
my_delete(tempname,MYF(MY_WME));
if (!silent && ! error)
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp
index 66107dbe0a9..5bd69905772 100644
--- a/extra/yassl/src/buffer.cpp
+++ b/extra/yassl/src/buffer.cpp
@@ -21,6 +21,9 @@
* with SSL types and sockets
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <string.h> // memcpy
#include "runtime.hpp"
diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp
index cea2ddb553e..4bd38445a6b 100644
--- a/extra/yassl/src/yassl_error.cpp
+++ b/extra/yassl/src/yassl_error.cpp
@@ -128,7 +128,7 @@ void SetErrorString(unsigned long error, char* buffer)
break;
case badVersion_error :
- strncpy(buffer, "protocl version mismatch", max);
+ strncpy(buffer, "protocol version mismatch", max);
break;
case compress_error :
diff --git a/extra/yassl/taocrypt/benchmark/benchmark.cpp b/extra/yassl/taocrypt/benchmark/benchmark.cpp
index 55e94275b20..1d38b080d0d 100644
--- a/extra/yassl/taocrypt/benchmark/benchmark.cpp
+++ b/extra/yassl/taocrypt/benchmark/benchmark.cpp
@@ -1,24 +1,10 @@
-/*
- Copyright (C) 2006, 2007 MySQL AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1301 USA.
-*/
-
// benchmark.cpp
// TaoCrypt benchmark
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <stdio.h>
diff --git a/extra/yassl/taocrypt/include/file.hpp b/extra/yassl/taocrypt/include/file.hpp
index 0f85b46fdb2..e22040f60f0 100644
--- a/extra/yassl/taocrypt/include/file.hpp
+++ b/extra/yassl/taocrypt/include/file.hpp
@@ -110,7 +110,7 @@ public:
word32 size(bool use_current = false);
private:
- void put(Source&);
+ size_t put(Source&);
FileSink(const FileSink&); // hide
FileSink& operator=(const FileSink&); // hide
diff --git a/extra/yassl/taocrypt/src/file.cpp b/extra/yassl/taocrypt/src/file.cpp
index 0498038a04b..88ead8e550e 100644
--- a/extra/yassl/taocrypt/src/file.cpp
+++ b/extra/yassl/taocrypt/src/file.cpp
@@ -98,9 +98,9 @@ FileSink::~FileSink()
// fill source from file sink
-void FileSink::put(Source& source)
+size_t FileSink::put(Source& source)
{
- fwrite(source.get_buffer(), 1, source.size(), file_);
+ return fwrite(source.get_buffer(), 1, source.size(), file_);
}
diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp
index f8177b31e2f..09836a2ef56 100644
--- a/extra/yassl/taocrypt/test/test.cpp
+++ b/extra/yassl/taocrypt/test/test.cpp
@@ -1,24 +1,10 @@
-/*
- Copyright (C) 2006, 2007 MySQL AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- MA 02110-1301 USA.
-*/
-
// test.cpp
// test taocrypt functionality
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <stdio.h>