~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_init.cc

  • Committer: Lee Bieber
  • Date: 2011-03-29 22:31:41 UTC
  • mfrom: (2257.1.3 build)
  • Revision ID: kalebral@gmail.com-20110329223141-yxc22h3l2he58sk0
Merge Andrew - 743842: Build failure using GCC 4.6
Merge Stewart - 738022: CachedDirectory silently fails to add entries if stat() fails
Merge Olaf - Common fwd: add copyright, add more declaration

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include "config.h"
 
16
#include <config.h>
17
17
 
18
 
#include "drizzled/internal/my_sys.h"
 
18
#include <drizzled/internal/my_sys.h>
19
19
#include "my_static.h"
20
 
#include "drizzled/error.h"
21
 
#include "drizzled/internal/m_string.h"
22
 
#include "drizzled/charset_info.h"
23
 
#include "drizzled/charset.h"
 
20
#include <drizzled/error.h>
 
21
#include <drizzled/internal/m_string.h>
 
22
#include <drizzled/charset_info.h>
 
23
#include <drizzled/charset.h>
24
24
#include <cstdio>
25
25
#include <cstdlib>
26
26
 
29
29
namespace internal
30
30
{
31
31
 
32
 
bool my_init_done= 0;
33
 
uint    mysys_usage_id= 0;              /* Incremented for each my_init() */
 
32
static bool my_init_done= 0;
34
33
 
35
34
static uint32_t atoi_octal(const char *str)
36
35
{
58
57
  char * str;
59
58
  if (my_init_done)
60
59
    return 0;
61
 
  my_init_done=1;
62
 
  mysys_usage_id++;
 
60
  my_init_done= true;
63
61
  my_umask= 0660;                       /* Default umask for new files */
64
62
  my_umask_dir= 0700;                   /* Default umask for new directories */
65
63
#if defined(HAVE_PTHREAD_INIT)
94
92
  my_thread_end();
95
93
  my_thread_global_end();
96
94
 
97
 
  my_init_done=0;
 
95
  my_init_done= false;
98
96
} /* my_end */
99
97
 
100
98
} /* namespace internal */