Commit b70852c2 authored by Timothy Smith's avatar Timothy Smith

auto-merge -build into -bugteam

parents de4e9216 a62103aa
...@@ -84,7 +84,7 @@ case $FLAG in ...@@ -84,7 +84,7 @@ case $FLAG in
cat $FILES | $AWK ' cat $FILES | $AWK '
BEGIN { BEGIN {
printf("/* Automatically generated file, do not edit */\n"); printf("/* Automatically generated file, do not edit */\n");
printf("#include \"sys.h\"\n#include \"el.h\"\n"); printf("#include \"config.h\"\n#include \"el.h\"\n");
printf("private const struct el_bindings_t el_func_help[] = {\n"); printf("private const struct el_bindings_t el_func_help[] = {\n");
low = "abcdefghijklmnopqrstuvwxyz_"; low = "abcdefghijklmnopqrstuvwxyz_";
high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_"; high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
...@@ -169,7 +169,7 @@ case $FLAG in ...@@ -169,7 +169,7 @@ case $FLAG in
cat $FILES | $AWK '/el_action_t/ { print $3 }' | sort | $AWK ' cat $FILES | $AWK '/el_action_t/ { print $3 }' | sort | $AWK '
BEGIN { BEGIN {
printf("/* Automatically generated file, do not edit */\n"); printf("/* Automatically generated file, do not edit */\n");
printf("#include \"sys.h\"\n#include \"el.h\"\n"); printf("#include \"config.h\"\n#include \"el.h\"\n");
printf("private const el_func_t el_func[] = {"); printf("private const el_func_t el_func[] = {");
maxlen = 80; maxlen = 80;
needn = 1; needn = 1;
......
...@@ -51,13 +51,10 @@ ...@@ -51,13 +51,10 @@
#else #else
#include "np/vis.h" #include "np/vis.h"
#endif #endif
#ifdef HAVE_ALLOCA_H #include "readline/readline.h"
#include <alloca.h>
#endif
#include "el.h" #include "el.h"
#include "fcns.h" /* for EL_NUM_FCNS */ #include "fcns.h" /* for EL_NUM_FCNS */
#include "histedit.h" #include "histedit.h"
#include "readline/readline.h"
#include "filecomplete.h" #include "filecomplete.h"
void rl_prep_terminal(int); void rl_prep_terminal(int);
......
...@@ -66,7 +66,7 @@ typedef KEYMAP_ENTRY *Keymap; ...@@ -66,7 +66,7 @@ typedef KEYMAP_ENTRY *Keymap;
#ifndef CTRL #ifndef CTRL
#include <sys/ioctl.h> #include <sys/ioctl.h>
#if !defined(__sun__) && !defined(__hpux__) #if !defined(__sun) && !defined(__hpux) && !defined(_AIX) && !defined(__QNXNTO__) && !defined(__USLC__)
#include <sys/ttydefaults.h> #include <sys/ttydefaults.h>
#endif #endif
#ifndef CTRL #ifndef CTRL
......
...@@ -914,14 +914,14 @@ vi_comment_out(EditLine *el, int c) ...@@ -914,14 +914,14 @@ vi_comment_out(EditLine *el, int c)
* NB: posix implies that we should enter insert mode, however * NB: posix implies that we should enter insert mode, however
* this is against historical precedent... * this is against historical precedent...
*/ */
#ifdef __weak_reference #if defined(__weak_reference) && !defined(__FreeBSD__)
extern char *get_alias_text(const char *) __weak_reference(get_alias_text); extern char *get_alias_text(const char *) __weak_reference(get_alias_text);
#endif #endif
protected el_action_t protected el_action_t
/*ARGSUSED*/ /*ARGSUSED*/
vi_alias(EditLine *el, int c) vi_alias(EditLine *el, int c)
{ {
#ifdef __weak_reference #if defined(__weak_reference) && !defined(__FreeBSD__)
char alias_name[3]; char alias_name[3];
char *alias_text; char *alias_text;
......
...@@ -486,40 +486,6 @@ typedef unsigned short ushort; ...@@ -486,40 +486,6 @@ typedef unsigned short ushort;
#define test_all_bits(a,b) (((a) & (b)) == (b)) #define test_all_bits(a,b) (((a) & (b)) == (b))
#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1)) #define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0]))) #define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))
#ifndef HAVE_RINT
/**
All integers up to this number can be represented exactly as double precision
values (DBL_MANT_DIG == 53 for IEEE 754 hardware).
*/
#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
/**
rint(3) implementation for platforms that do not have it.
Always rounds to the nearest integer with ties being rounded to the nearest
even integer to mimic glibc's rint() behavior in the "round-to-nearest"
FPU mode. Hardware-specific optimizations are possible (frndint on x86).
Unlike this implementation, hardware will also honor the FPU rounding mode.
*/
static inline double rint(double x)
{
double f, i;
f = modf(x, &i);
/*
All doubles with absolute values > MAX_EXACT_INTEGER are even anyway,
no need to check it.
*/
if (x > 0.0)
i += (double) ((f > 0.5) || (f == 0.5 &&
i <= (double) MAX_EXACT_INTEGER &&
(longlong) i % 2));
else
i -= (double) ((f < -0.5) || (f == -0.5 &&
i >= (double) -MAX_EXACT_INTEGER &&
(longlong) i % 2));
return i;
}
#endif /* HAVE_RINT */
/* Define some general constants */ /* Define some general constants */
#ifndef TRUE #ifndef TRUE
...@@ -1401,4 +1367,39 @@ do { doubleget_union _tmp; \ ...@@ -1401,4 +1367,39 @@ do { doubleget_union _tmp; \
#define MY_INT64_NUM_DECIMAL_DIGITS 21 #define MY_INT64_NUM_DECIMAL_DIGITS 21
#ifndef HAVE_RINT
/**
All integers up to this number can be represented exactly as double precision
values (DBL_MANT_DIG == 53 for IEEE 754 hardware).
*/
#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
/**
rint(3) implementation for platforms that do not have it.
Always rounds to the nearest integer with ties being rounded to the nearest
even integer to mimic glibc's rint() behavior in the "round-to-nearest"
FPU mode. Hardware-specific optimizations are possible (frndint on x86).
Unlike this implementation, hardware will also honor the FPU rounding mode.
*/
static inline double rint(double x)
{
double f, i;
f = modf(x, &i);
/*
All doubles with absolute values > MAX_EXACT_INTEGER are even anyway,
no need to check it.
*/
if (x > 0.0)
i += (double) ((f > 0.5) || (f == 0.5 &&
i <= (double) MAX_EXACT_INTEGER &&
(longlong) i % 2));
else
i -= (double) ((f < -0.5) || (f == -0.5 &&
i >= (double) -MAX_EXACT_INTEGER &&
(longlong) i % 2));
return i;
}
#endif /* HAVE_RINT */
#endif /* my_global_h */ #endif /* my_global_h */
# Copyright (C) 2000-2007 MySQL AB # Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -87,7 +87,7 @@ is intended for mission-critical, heavy-load production systems as well ...@@ -87,7 +87,7 @@ is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of as for embedding into mass-deployed software. MySQL is a trademark of
MySQL AB. MySQL AB.
Copyright (C) 2000-2007 MySQL AB Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software, This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license. and you are welcome to modify and redistribute it under the GPL license.
...@@ -109,7 +109,7 @@ is intended for mission-critical, heavy-load production systems as well ...@@ -109,7 +109,7 @@ is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of as for embedding into mass-deployed software. MySQL is a trademark of
MySQL AB. MySQL AB.
Copyright (C) 2000-2007 MySQL AB Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This software comes with ABSOLUTELY NO WARRANTY. This is free software, This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license. and you are welcome to modify and redistribute it under the GPL license.
...@@ -320,8 +320,12 @@ do ...@@ -320,8 +320,12 @@ do
# We are in a subshell, so we can modify variables just for one run. # We are in a subshell, so we can modify variables just for one run.
if test "$servertype" != ' ' if test "$servertype" != ' '
then then
CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]* //' -e 's/-unroll2 //' -e 's/-ip //'` CFLAGS=`echo " $CFLAGS " | \
CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-O[0-9]* //' -e 's/-unroll2 //' -e 's/-ip //'` sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' \
-e 's/^ //' -e 's/ $//'`
CXXFLAGS=`echo " $CXXFLAGS " | \
sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' \
-e 's/^ //' -e 's/ $//'`
fi fi
BuildMySQL "\ BuildMySQL "\
...@@ -807,6 +811,10 @@ fi ...@@ -807,6 +811,10 @@ fi
# itself - note that they must be ordered by date (important when # itself - note that they must be ordered by date (important when
# merging BK trees) # merging BK trees)
%changelog %changelog
* Fri Nov 07 2008 Joerg Bruehe <joerg@mysql.com>
- Correct yesterday's fix, so that it also works for the last flag.
* Thu Nov 06 2008 Joerg Bruehe <joerg@mysql.com> * Thu Nov 06 2008 Joerg Bruehe <joerg@mysql.com>
- Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. - Modify CFLAGS and CXXFLAGS such that a debug build is not optimized.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment