~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
/* Copyright (C) 2000 MySQL AB
2
3
   This program is free software; you can redistribute it and/or modify
4
   it under the terms of the GNU General Public License as published by
5
   the Free Software Foundation; version 2 of the License.
6
7
   This program is distributed in the hope that it will be useful,
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
   GNU General Public License for more details.
11
12
   You should have received a copy of the GNU General Public License
13
   along with this program; if not, write to the Free Software
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
16
/*
17
  Static variables for mysys library. All definied here for easy making of
18
  a shared library
19
*/
20
595 by Brian Aker
Fix, partial, for Sun Studio.
21
#include <stdlib.h>
1 by brian
clean slate
22
#include "mysys_priv.h"
202.3.6 by Monty Taylor
First pass at gettexizing the error messages.
23
#include <mysys/mysys_err.h>
1 by brian
clean slate
24
#include "my_static.h"
25
146 by Brian Aker
my_bool cleanup.
26
bool timed_mutexes= 0;
1 by brian
clean slate
27
28
	/* from my_init */
29
char *	home_dir=0;
30
const char      *my_progname=0;
31
char curr_dir[FN_REFLEN]= {0},
32
     home_dir_buff[FN_REFLEN]= {0};
298 by Brian Aker
ulong conversion.
33
uint32_t		my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
34
uint32_t           my_file_total_opened= 0;
1 by brian
clean slate
35
int my_umask=0664, my_umask_dir=0777;
36
struct st_my_file_info my_file_info_default[MY_NFILE]= {{0,UNOPEN}};
482 by Brian Aker
Remove uint.
37
uint32_t   my_file_limit= MY_NFILE;
1 by brian
clean slate
38
struct st_my_file_info *my_file_info= my_file_info_default;
39
40
	/* From mf_brkhant */
41
int my_dont_interrupt=0;
42
volatile int		_my_signals=0;
43
struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
44
sigset_t my_signals;			/* signals blocked by mf_brkhant */
45
46
	/* from mf_reccache.c */
298 by Brian Aker
ulong conversion.
47
uint32_t my_default_record_cache_size=RECORD_CACHE_SIZE;
1 by brian
clean slate
48
49
	/* from soundex.c */
50
				/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
51
				/* :::::::::::::::::::::::::: */
52
const char *soundex_map=	  "01230120022455012623010202";
53
54
	/* from my_malloc */
55
USED_MEM* my_once_root_block=0;			/* pointer to first block */
56
uint	  my_once_extra=ONCE_ALLOC_INIT;	/* Memory to alloc / block */
57
58
	/* from safe_malloc */
482 by Brian Aker
Remove uint.
59
uint32_t sf_malloc_prehunc=0,		/* If you have problem with core- */
1 by brian
clean slate
60
     sf_malloc_endhunc=0,		/* dump when malloc-message.... */
61
					/* set theese to 64 or 128  */
62
     sf_malloc_quick=0;			/* set if no calls to sanity */
298 by Brian Aker
ulong conversion.
63
uint32_t sf_malloc_cur_memory= 0L;		/* Current memory usage */
64
uint32_t sf_malloc_max_memory= 0L;		/* Maximum memory usage */
482 by Brian Aker
Remove uint.
65
uint32_t  sf_malloc_count= 0;		/* Number of times NEW() was called */
481 by Brian Aker
Remove all of uchar.
66
unsigned char *sf_min_adress= (unsigned char*) ~(unsigned long) 0L,
67
     *sf_max_adress= (unsigned char*) 0L;
1 by brian
clean slate
68
/* Root of the linked list of struct st_irem */
69
struct st_irem *sf_malloc_root = NULL;
70
71
	/* from my_alarm */
72
int volatile my_have_got_alarm=0;	/* declare variable to reset */
298 by Brian Aker
ulong conversion.
73
uint32_t my_time_to_wait_for_lock=2;	/* In seconds */
1 by brian
clean slate
74
75
	/* from errors.c */
76
void (*my_abort_hook)(int) = (void(*)(int)) exit;
482 by Brian Aker
Remove uint.
77
void (*error_handler_hook)(uint32_t error,const char *str,myf MyFlags)=
1 by brian
clean slate
78
    my_message_no_curses;
482 by Brian Aker
Remove uint.
79
void (*fatal_error_handler_hook)(uint32_t error,const char *str,myf MyFlags)=
1 by brian
clean slate
80
  my_message_no_curses;
81
82
	/* How to disable options */
146 by Brian Aker
my_bool cleanup.
83
bool my_disable_async_io=0;
84
bool my_disable_flush_key_blocks=0;
85
bool my_disable_symlinks=0;
86
bool mysys_uses_curses=0;