~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getwd.c

Coupla small include cleanups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
#else
72
72
#error "No way to get current directory"
73
73
#endif
74
 
    if (*((pos= strchr(buf, '\0'))-1) != FN_LIBCHAR)  /* End with FN_LIBCHAR */
 
74
    if (*((pos=strend(buf))-1) != FN_LIBCHAR)  /* End with FN_LIBCHAR */
75
75
    {
76
76
      pos[0]= FN_LIBCHAR;
77
77
      pos[1]=0;
88
88
{
89
89
  int res;
90
90
  size_t length;
91
 
  const char *start;
92
 
  char *pos;
 
91
  char *start, *pos;
93
92
#if defined(VMS)
94
93
  char buff[FN_REFLEN];
95
94
#endif
96
95
 
97
 
  start= dir;
 
96
  start=(char *) dir;
98
97
  if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
99
98
    dir=FN_ROOTDIR;
100
99
#ifdef VMS
101
100
  {
102
 
    pos=stpcpy(buff,dir);
 
101
    pos=strmov(buff,dir);
103
102
    if (pos[-1] != FN_LIBCHAR)
104
103
    {
105
104
      pos[0]=FN_LIBCHAR;                /* Mark as directory */
109
108
    dir=buff;
110
109
  }
111
110
#endif /* VMS */
112
 
  if ((res=chdir(dir)) != 0)
 
111
  if ((res=chdir((char*) dir)) != 0)
113
112
  {
114
113
    my_errno=errno;
115
114
    if (MyFlags & MY_WME)