~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_symlink.cc

  • Committer: Brian Aker
  • Date: 2008-12-16 07:07:50 UTC
  • Revision ID: brian@tangent.org-20081216070750-o5ykltxxqvn2awrx
Fixed errors test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
int my_readlink(char *to, const char *filename, myf MyFlags)
36
36
{
37
37
#ifndef HAVE_READLINK
38
 
  stpcpy(to,filename);
 
38
  strcpy(to,filename);
39
39
  return 1;
40
40
#else
41
41
  int result=0;
47
47
    if ((my_errno=errno) == EINVAL)
48
48
    {
49
49
      result= 1;
50
 
      stpcpy(to,filename);
 
50
      strcpy(to,filename);
51
51
    }
52
52
    else
53
53
    {
118
118
    char *ptr;
119
119
    if ((ptr=realpath(filename,buff)))
120
120
    {
121
 
      strmake(to,ptr,FN_REFLEN-1);
 
121
      strncpy(to,ptr,FN_REFLEN-1);
122
122
    }
123
123
    else
124
124
    {
130
130
      my_errno=errno;
131
131
      if (MyFlags & MY_WME)
132
132
        my_error(EE_REALPATH, MYF(0), filename, my_errno);
133
 
      my_load_path(to, filename, NullS);
 
133
      my_load_path(to, filename, NULL);
134
134
      result= -1;
135
135
    }
136
136
  }
137
137
  return(result);
138
138
#else
139
 
  my_load_path(to, filename, NullS);
 
139
  my_load_path(to, filename, NULL);
140
140
  return 0;
141
141
#endif
142
142
}