~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_pack.cc

  • Committer: Monty Taylor
  • Date: 2008-11-11 01:17:35 UTC
  • mto: This revision was merged to the branch mainline in revision 584.
  • Revision ID: monty@inaugust.com-20081111011735-ct447w151fbbubcu
Removed my_getwd.
Moved replication files.
Moved more stuff out of server_includes.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifdef HAVE_PWD_H
20
20
#include <pwd.h>
21
21
#endif
22
 
#ifdef VMS
23
 
#include <rms.h>
24
 
#include <iodef.h>
25
 
#include <descrip.h>
26
 
#endif /* VMS */
27
22
 
28
23
static char * expand_tilde(char * *path);
29
24
 
33
28
 
34
29
void pack_dirname(char * to, const char *from)
35
30
{
36
 
  int cwd_err;
 
31
  int getcwd_error= 0;
37
32
  size_t d_length,length,buff_length= 0;
38
33
  char * start;
39
34
  char buff[FN_REFLEN];
47
42
#endif
48
43
    start=to;
49
44
 
50
 
  if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0))))
 
45
  if (!(getcwd(buff, FN_REFLEN)))
51
46
  {
 
47
    getcwd_error= errno;
52
48
    buff_length= strlen(buff);
53
49
    d_length= (size_t) (start-to);
54
50
    if ((start == to ||
76
72
        (void) strmov_overlapp(to+1,to+length);
77
73
      }
78
74
    }
79
 
    if (! cwd_err)
 
75
    if (! getcwd_error)
80
76
    {                                           /* Test if cwd is ~/... */
81
77
      if (length > 1 && length < buff_length)
82
78
      {
183
179
          }
184
180
          if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR))
185
181
          {
186
 
            if (my_getwd(curr_dir,FN_REFLEN,MYF(0)))
 
182
            if (getcwd(curr_dir,FN_REFLEN))
187
183
            {
188
184
              pos+=length+1;                    /* Don't unpack ./.. */
189
185
              continue;