~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/charset.cc

  • Committer: Monty Taylor
  • Date: 2008-12-20 23:44:07 UTC
  • mto: (722.2.2 devel)
  • mto: This revision was merged to the branch mainline in revision 727.
  • Revision ID: monty@inaugust.com-20081220234407-585wdrdd1vxqqzam
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
we need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include "mysys_err.h"
18
18
#include <mystrings/m_ctype.h>
19
19
#include <mystrings/m_string.h>
 
20
#include <drizzled/configmake.h>
20
21
 
21
22
 
22
23
/*
123
124
 
124
125
char *get_charsets_dir(char *buf)
125
126
{
126
 
  const char *sharedir= SHAREDIR;
127
127
  char *res;
128
128
 
129
129
  if (charsets_dir != NULL)
130
130
    strncpy(buf, charsets_dir, FN_REFLEN-1);
131
131
  else
132
132
  {
133
 
    if (test_if_hard_path(sharedir) ||
134
 
        is_prefix(sharedir, DEFAULT_CHARSET_HOME))
135
 
      sprintf(buf,"%s/%s",sharedir,CHARSET_DIR);
 
133
    if (test_if_hard_path(PKGDATADIR) ||
 
134
        is_prefix(PKGDATADIR, PREFIX))
 
135
      sprintf(buf,"%s/%s",PKGDATADIR,CHARSET_DIR);
136
136
    else
137
 
      sprintf(buf,"%s/%s/%s",DEFAULT_CHARSET_HOME,sharedir,CHARSET_DIR);
 
137
      sprintf(buf,"%s/%s/%s",PREFIX,PKGDATADIR,CHARSET_DIR);
138
138
  }
139
139
  res= convert_dirname(buf,buf,NULL);
140
140
  return(res);