Commit 927d747a authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-5.0

into serg.mylan:/usr/home/serg/Abk/mysql-5.0


configure.in:
  Auto merged
parents e31358ae 90110b84
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -53,11 +53,14 @@ max_leave_isam_configs="--with-innodb --with-berkeley-db --with-ndbcluster --wit
max_no_es_configs="$max_leave_isam_configs --without-isam"
max_configs="$max_no_es_configs --with-embedded-server"

alpha_cflags="-mcpu=ev6 -Wa,-mev6"	# Not used yet
amd64_cflags=""				# If dropping '--with-big-tables', add here  "-DBIG_TABLES"
pentium_cflags="-mcpu=pentiumpro"
pentium64_cflags="-mcpu=nocona -m64"
ppc_cflags="-mpowerpc -mcpu=powerpc"
path=`dirname $0`
. "$path/check-cpu"

alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag"
amd64_cflags="$check_cpu_cflags"
pentium_cflags="$check_cpu_cflags"
pentium64_cflags="$check_cpu_cflags -m64"
ppc_cflags="$check_cpu_cflags"
sparc_cflags=""

# be as fast as we can be without losing our ability to backtrace

BUILD/check-cpu

0 → 100755
+81 −0
Original line number Diff line number Diff line
#!/bin/sh
#
# Check cpu of current machine and find the
# best compiler optimization flags for gcc
#
#

if test -r /proc/cpuinfo ; then
  cpuinfo="cat /proc/cpuinfo"
  cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
  if test -z "$cpu_family" ; then
    cpu_family=`$cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
  fi
  cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
  model_name=`$cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
  if test -z "$model_name" ; then
    model_name=`$cpuinfo | grep 'cpu model' | cut -d ':' -f 2 | head -1`
  fi
  if test -z "$model_name" ; then
    model_name=`uname -m`
  fi
fi

case "$cpu_family--$model_name" in
  Alpha*EV6*)
    cpu_flag="ev6";
    ;;
  *Xeon*)
    cpu_flag="nocona";
    ;;
  *Pentium*4*CPU*)
    cpu_flag="pentium4";
    ;;
  *Athlon*64*)
    cpu_flag="athlon64";
    ;;
  *Athlon*)
    cpu_flag="athlon";
    ;;
  *Itanium*)
    # Don't need to set any flags for itanium(at the moment)
    cpu_flag="";
    ;;
  *ppc)
    cpu_flag="powerpc";
    ;;
  *)
    cpu_flag="";
    ;;
esac

if test -z "$cpu_flag"; then
  echo "BUILD/check-cpu: Oops, could not findout what kind of cpu this machine is using."
  check_cpu_flags=""
  return
fi

echo "cpu_flag: $cpu_flag"

if test -z "$CC" ; then
  cc="gcc";
else
  cc=$CC

fi

cc_ver=`$cc --version | sed 1q`
cc_verno=`echo $cc_ver | sed -e 's/[^0-9. ]//g;	 s/^ *//g; s/ .*//g'`

case "$cc_ver--$cc_verno" in
  *GCC*--3.4*|*GCC*--3.5*|*GCC*--4.*)
    check_cpu_cflags="-mtune=$cpu_flag -march=$cpu_flag"
    ;;
  *GCC*)
    check_cpu_cflags="-mcpu=$cpu_flag -march=$cpu_flag"
    ;;
  *)
    check_cpu_cflags=""
    ;;
esac
echo $check_cpu_cflags
+11 −3
Original line number Diff line number Diff line
@@ -703,8 +703,16 @@ static void usage(int version)
#ifdef __NETWARE__
#define printf	consoleprintf
#endif
  printf("%s  Ver %s Distrib %s, for %s (%s)\n",
	 my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);

#if defined(USE_LIBEDIT_INTERFACE)
  const char* readline= "";
#else
  const char* readline= "readline";
#endif

  printf("%s  Ver %s Distrib %s, for %s (%s) using %s %s\n",
	 my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE,
         readline, rl_library_version);
  if (version)
    return;
  printf("\
@@ -1323,7 +1331,7 @@ static void initialize_readline (char *name)
  setlocale(LC_ALL,""); /* so as libedit use isprint */
#endif
  rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
  rl_completion_entry_function= (CPFunction*)&no_completion;
  rl_completion_entry_function= (Function*)&no_completion;
#else
  rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
  rl_completion_entry_function= (Function*)&no_completion;
+37 −18
Original line number Diff line number Diff line
/*	$NetBSD: chared.c,v 1.18 2002/11/20 16:50:08 christos Exp $	*/
/*	$NetBSD: chared.c,v 1.22 2004/08/13 12:10:38 mycroft Exp $	*/

/*-
 * Copyright (c) 1992, 1993
@@ -15,11 +15,7 @@
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
@@ -36,14 +32,7 @@
 * SUCH DAMAGE.
 */

#include "config.h"
#if !defined(lint) && !defined(SCCSID)
#if 0
static char sccsid[] = "@(#)chared.c	8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: chared.c,v 1.18 2002/11/20 16:50:08 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
#include <config.h>

/*
 * chared.c: Character editor utilities
@@ -62,13 +51,13 @@ cv_undo(EditLine *el)
{
	c_undo_t *vu = &el->el_chared.c_undo;
	c_redo_t *r = &el->el_chared.c_redo;
	int size;
	uint size;

	/* Save entire line for undo */
	size = el->el_line.lastchar - el->el_line.buffer;
	vu->len = size;
	vu->cursor = el->el_line.cursor - el->el_line.buffer;
	memcpy(vu->buf, el->el_line.buffer, (size_t)size);
	memcpy(vu->buf, el->el_line.buffer, size);

	/* save command info for redo */
	r->count = el->el_state.doingarg ? el->el_state.argument : 0;
@@ -139,6 +128,21 @@ c_delafter(EditLine *el, int num)
}


/* c_delafter1():
 *	Delete the character after the cursor, do not yank
 */
protected void
c_delafter1(EditLine *el)
{
	char *cp;

	for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++)
		*cp = cp[1];

	el->el_line.lastchar--;
}


/* c_delbefore():
 *	Delete num characters before the cursor
 */
@@ -167,6 +171,21 @@ c_delbefore(EditLine *el, int num)
}


/* c_delbefore1():
 *	Delete the character before the cursor, do not yank
 */
protected void
c_delbefore1(EditLine *el)
{
	char *cp;

	for (cp = el->el_line.cursor - 1; cp <= el->el_line.lastchar; cp++)
		*cp = cp[1];

	el->el_line.lastchar--;
}


/* ce__isword():
 *	Return if p is part of a word according to emacs
 */
@@ -460,8 +479,8 @@ ch_init(EditLine *el)
	el->el_state.argument		= 1;
	el->el_state.lastcmd		= ED_UNASSIGNED;

	el->el_chared.c_macro.nline	= NULL;
	el->el_chared.c_macro.level	= -1;
	el->el_chared.c_macro.offset	= 0;
	el->el_chared.c_macro.macro	= (char **) el_malloc(EL_MAXMACRO *
	    sizeof(char *));
	if (el->el_chared.c_macro.macro == NULL)
@@ -582,7 +601,7 @@ ch_enlargebufs(el, addlen)
		return 0;

	/* Safe to set enlarged buffer size */
	el->el_line.limit  = &newbuffer[newsz - EL_LEAVE];
	el->el_line.limit  = &el->el_line.buffer[newsz - EL_LEAVE];
	return 1;
}

+5 −7
Original line number Diff line number Diff line
/*	$NetBSD: chared.h,v 1.11 2002/11/20 16:50:08 christos Exp $	*/
/*	$NetBSD: chared.h,v 1.14 2004/08/13 12:10:39 mycroft Exp $	*/

/*-
 * Copyright (c) 1992, 1993
@@ -15,11 +15,7 @@
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
@@ -66,8 +62,8 @@

typedef struct c_macro_t {
	int	  level;
	int	  offset;
	char	**macro;
	char	 *nline;
} c_macro_t;

/*
@@ -158,7 +154,9 @@ protected char *c__next_word(char *, char *, int, int (*)(int));
protected char	*c__prev_word(char *, char *, int, int (*)(int));
protected void	 c_insert(EditLine *, int);
protected void	 c_delbefore(EditLine *, int);
protected void	 c_delbefore1(EditLine *);
protected void	 c_delafter(EditLine *, int);
protected void	 c_delafter1(EditLine *);
protected int	 c_gets(EditLine *, char *, const char *);
protected int	 c_hpos(EditLine *);

Loading