~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_path.cc

  • Committer: Stewart Smith
  • Date: 2008-12-23 00:00:45 UTC
  • mfrom: (728 testable)
  • mto: This revision was merged to the branch mainline in revision 734.
  • Revision ID: stewart@flamingspork.com-20081223000045-4r4asnt8odzvqjpu
merge with mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include "mysys_priv.h"
17
17
#include <mystrings/m_string.h>
18
18
#include "my_static.h"
 
19
#include <drizzled/configmake.h>
19
20
#include <stdlib.h>
20
21
#include <sstream>
21
22
 
37
38
char * my_path(char * to, const char *progname,
38
39
               const char *own_pathname_part)
39
40
{
40
 
  char *start, *end, *prog;
 
41
  char *start, *prog;
 
42
  const char *end;
41
43
  size_t to_length;
42
44
 
43
45
  start=to;                                     /* Return this */
58
60
    if ((end = getenv("MY_BASEDIR_VERSION")) == 0 &&
59
61
        (end = getenv("MY_BASEDIR")) == 0)
60
62
    {
61
 
#ifdef DEFAULT_BASEDIR
62
 
      end= (char*) DEFAULT_BASEDIR;
63
 
#else
64
 
      end= (char*) "/my/";
65
 
#endif
 
63
      end= PREFIX;
66
64
    }
67
65
    intern_filename(to,end);
68
66
    to= strchr(to, '\0');