~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_symlink.cc

  • Committer: Brian Aker
  • Date: 2009-05-11 17:50:22 UTC
  • Revision ID: brian@gaz-20090511175022-y35q9ky6uh9ldcjt
Replacing Sun employee copyright headers (aka... anything done by a Sun
employee is copyright by Sun).

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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include "mysys_priv.h"
17
 
#include "mysys_err.h"
 
16
#include "mysys/mysys_priv.h"
 
17
#include "mysys/mysys_err.h"
18
18
#include <mystrings/m_string.h>
19
19
#include <errno.h>
20
20
#ifdef HAVE_REALPATH
35
35
int my_readlink(char *to, const char *filename, myf MyFlags)
36
36
{
37
37
#ifndef HAVE_READLINK
38
 
  my_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
 
      my_stpcpy(to,filename);
 
50
      strcpy(to,filename);
51
51
    }
52
52
    else
53
53
    {
104
104
#define BUFF_LEN FN_LEN
105
105
#endif
106
106
 
107
 
int my_realpath(char *to, const char *filename,
108
 
                myf MyFlags __attribute__((unused)))
 
107
int my_realpath(char *to, const char *filename, myf MyFlags)
109
108
{
110
 
#if defined(HAVE_REALPATH) && !defined(HAVE_purify) && !defined(HAVE_BROKEN_REALPATH)
 
109
#if defined(HAVE_REALPATH) &&  !defined(HAVE_BROKEN_REALPATH)
111
110
  int result=0;
112
111
  char buff[BUFF_LEN];
113
112
  struct stat stat_buff;
118
117
    char *ptr;
119
118
    if ((ptr=realpath(filename,buff)))
120
119
    {
121
 
      strmake(to,ptr,FN_REFLEN-1);
 
120
      strncpy(to,ptr,FN_REFLEN-1);
122
121
    }
123
122
    else
124
123
    {