~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
21
#include "mysys_priv.h"
22
#include "my_static.h"
23
24
my_bool timed_mutexes= 0;
25
26
	/* from my_init */
27
char *	home_dir=0;
28
const char      *my_progname=0;
29
char curr_dir[FN_REFLEN]= {0},
30
     home_dir_buff[FN_REFLEN]= {0};
31
ulong		my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;
32
ulong           my_file_total_opened= 0;
33
int my_umask=0664, my_umask_dir=0777;
34
struct st_my_file_info my_file_info_default[MY_NFILE]= {{0,UNOPEN}};
35
uint   my_file_limit= MY_NFILE;
36
struct st_my_file_info *my_file_info= my_file_info_default;
37
38
	/* From mf_brkhant */
39
int my_dont_interrupt=0;
40
volatile int		_my_signals=0;
41
struct st_remember _my_sig_remember[MAX_SIGNALS]={{0,0}};
42
sigset_t my_signals;			/* signals blocked by mf_brkhant */
43
44
	/* from mf_reccache.c */
45
ulong my_default_record_cache_size=RECORD_CACHE_SIZE;
46
47
	/* from soundex.c */
48
				/* ABCDEFGHIJKLMNOPQRSTUVWXYZ */
49
				/* :::::::::::::::::::::::::: */
50
const char *soundex_map=	  "01230120022455012623010202";
51
52
	/* from my_malloc */
53
USED_MEM* my_once_root_block=0;			/* pointer to first block */
54
uint	  my_once_extra=ONCE_ALLOC_INIT;	/* Memory to alloc / block */
55
56
	/* from safe_malloc */
57
uint sf_malloc_prehunc=0,		/* If you have problem with core- */
58
     sf_malloc_endhunc=0,		/* dump when malloc-message.... */
59
					/* set theese to 64 or 128  */
60
     sf_malloc_quick=0;			/* set if no calls to sanity */
61
ulong sf_malloc_cur_memory= 0L;		/* Current memory usage */
62
ulong sf_malloc_max_memory= 0L;		/* Maximum memory usage */
63
uint  sf_malloc_count= 0;		/* Number of times NEW() was called */
64
uchar *sf_min_adress= (uchar*) ~(unsigned long) 0L,
65
     *sf_max_adress= (uchar*) 0L;
66
/* Root of the linked list of struct st_irem */
67
struct st_irem *sf_malloc_root = NULL;
68
69
	/* from my_alarm */
70
int volatile my_have_got_alarm=0;	/* declare variable to reset */
71
ulong my_time_to_wait_for_lock=2;	/* In seconds */
72
73
	/* from errors.c */
74
#ifdef SHARED_LIBRARY
75
char * globerrs[GLOBERRS];		/* my_error_messages is here */
76
#endif
77
void (*my_abort_hook)(int) = (void(*)(int)) exit;
78
void (*error_handler_hook)(uint error,const char *str,myf MyFlags)=
79
    my_message_no_curses;
80
void (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
81
  my_message_no_curses;
82
83
	/* How to disable options */
84
my_bool my_disable_locking=0;
85
my_bool my_disable_async_io=0;
86
my_bool my_disable_flush_key_blocks=0;
87
my_bool my_disable_symlinks=0;
88
my_bool mysys_uses_curses=0;