Commit a5273edd authored by df@kahlann.erinye.com's avatar df@kahlann.erinye.com

Merge kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build-work

into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build
parents 02bfa163 c5de0332
......@@ -5,9 +5,13 @@
#
check_cpu () {
if test -r /proc/cpuinfo ; then
CPUINFO=/proc/cpuinfo
if test -n "$TEST_CPUINFO" ; then
CPUINFO=$TEST_CPUINFO
fi
if test -r "$CPUINFO" -a "$CPUINFO" != " " ; then
# on Linux (and others?) we can get detailed CPU information out of /proc
cpuinfo="cat /proc/cpuinfo"
cpuinfo="cat $CPUINFO"
# detect CPU family
cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
......@@ -33,6 +37,7 @@ check_cpu () {
done
else
# Fallback when there is no /proc/cpuinfo
CPUINFO=" "
case "`uname -s`" in
FreeBSD|OpenBSD)
cpu_family=`uname -m`;
......@@ -84,6 +89,18 @@ check_cpu () {
*Pentium*M*pro*)
cpu_arg="pentium-m";
;;
*Celeron\(R\)*\ M*)
cpu_arg="pentium-m";
;;
*Celeron*Coppermine*)
cpu_arg="pentium3"
;;
*Celeron\(R\)*)
cpu_arg="pentium4"
;;
*Celeron*)
cpu_arg="pentium2";
;;
*Athlon*64*)
cpu_arg="athlon64";
;;
......@@ -120,7 +137,14 @@ check_cpu () {
esac
if test -z "$cpu_arg"; then
if test -z "$cpu_arg" ; then
if test "$CPUINFO" != " " ; then
# fallback to uname if necessary
TEST_CPUINFO=" "
check_cpu_cflags=""
check_cpu
return
fi
echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2
check_cpu_cflags=""
return
......
......@@ -1036,7 +1036,7 @@ sub command_line_setup () {
# On some operating systems, there is a limit to the length of a
# UNIX domain socket's path far below PATH_MAX, so try to avoid long
# socket path names.
$sockdir = tempdir(CLEANUP => 1) if ( length($sockdir) > 80 );
$sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 );
# Put this into a hash, will be a C struct
......
......@@ -465,6 +465,9 @@ MySQLaccess::Report::Print_Header();
elsif (-f "@sysconfdir@/$script_conf") {
require "@sysconfdir@/$script_conf";
}
elsif (-f "/etc/$script_conf") {
require "/etc/$script_conf";
}
# ****************************
# Read in all parameters
......@@ -930,6 +933,7 @@ sub MergeConfigFile {
sub MergeConfigFiles {
my ($name,$pass,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid $<;
MergeConfigFile("@sysconfdir@/my.cnf");
MergeConfigFile("/etc/my.cnf");
MergeConfigFile("$dir/.my.cnf");
}
......
......@@ -467,6 +467,9 @@ sub find_groups
if (-f "@sysconfdir@/my.cnf" && -r "@sysconfdir@/my.cnf")
{
open(MY_CNF, "<@sysconfdir@/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
} elsif (-f "/etc/my.cnf" && -r "/etc/my.cnf")
{
open(MY_CNF, "</etc/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
}
for ($i = 0; ($line = shift @tmp); $i++)
{
......
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