~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getwd.c

  • Committer: Monty Taylor
  • Date: 2008-09-14 22:10:23 UTC
  • mto: This revision was merged to the branch mainline in revision 388.
  • Revision ID: monty@inaugust.com-20080914221023-otz8vuui590zp5yf
Got rid of libsqlcommon and some surious defines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifdef HAVE_GETWD
23
23
#include <sys/param.h>
24
24
#endif
25
 
#include <drizzled/util/test.h>
26
25
 
27
26
/* Gets current working directory in buff.
28
27
 
45
44
  char * pos;
46
45
 
47
46
  if (curr_dir[0])                              /* Current pos is saved here */
48
 
    strmake(buf,&curr_dir[0],size-1);
 
47
    VOID(strmake(buf,&curr_dir[0],size-1));
49
48
  else
50
49
  {
51
50
#if defined(HAVE_GETCWD)
100
99
    dir=FN_ROOTDIR;
101
100
#ifdef VMS
102
101
  {
103
 
    pos=my_stpcpy(buff,dir);
 
102
    pos=stpcpy(buff,dir);
104
103
    if (pos[-1] != FN_LIBCHAR)
105
104
    {
106
105
      pos[0]=FN_LIBCHAR;                /* Mark as directory */
142
141
int test_if_hard_path(register const char *dir_name)
143
142
{
144
143
  if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR)
145
 
    return (home_dir != NULL && test_if_hard_path(home_dir));
 
144
    return (home_dir != NullS && test_if_hard_path(home_dir));
146
145
  if (dir_name[0] == FN_LIBCHAR)
147
146
    return (true);
148
147
#ifdef FN_DEVCHAR