Revision 1847 trunk/src/linad99/makesub.cpp

makesub.cpp (revision 1847)
12 12
#include <adstring.hpp>
13 13
//#include <fstream.h>
14 14
#include <stdlib.h>
15
#if (defined(__GNUDOS__) || defined(unix) || defined(__BORLANDC__))
16
#  include <dirent.h>
15
#if !defined(_MSC_VER)
16
  #include <dirent.h>
17
  #include <sys/stat.h>
17 18
#endif
18 19
#if defined(__BORLANDC__)
19 20
#  include <dir.h>
20 21
#endif
21
#if (defined(__GNUDOS__) || defined(unix))
22
#  include <sys/stat.h>
23
#endif
24 22
#if defined(_WIN32)
25 23
#  include <windows.h>
26 24
#else
......
49 47
{
50 48
#if defined(_WIN32)
51 49
  return SetCurrentDirectory(s);
52
#elif (defined(__GNUDOS__) || defined(unix) || defined(__linux__) )
53
    return chdir(s);
54 50
#else
55
  xxx
56
  // not defined for this compiler
51
  return chdir(s);
57 52
#endif
58 53
}
59 54

  
......
69 64
  tmp[0]='\0';
70 65
  GetCurrentDirectory(100,tmp);
71 66
  s=tmp;
72
#elif (defined(__GNUDOS__) || defined(unix) || defined(__linux__) )
67
#else
73 68
  char tmp[101];
74 69
  tmp[0]='\0';
75 70
  getcwd(tmp,100);
76 71
  s=adstring(tmp);
77
#else
78
  xxx
79
  // not defined for this compiler
80 72
#endif
81 73
}
82 74

  
......
88 80
{
89 81
#if defined(_WIN32)
90 82
  return CreateDirectory(s,NULL);
91
#elif (defined(__GNUDOS__) || defined(unix) || defined(__linux__) )
92
    return mkdir(s,S_IREAD | S_IWRITE);
93 83
#else
94
  xxxx
95
  cerr << "ad_mkdir not defined for this compiler" << endl;
84
  return mkdir(s,S_IREAD | S_IWRITE);
96 85
#endif
97 86
}
98 87

  

Also available in: Unified diff