+2006-11-17 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TempFileCollection.cs : make it work under non-libc environment.
+
2006-11-16 Marek Habersack <grendello@gmail.com>
* Compiler.cs: ConfigurationElement to handle the <compiler>
// Create a subdirectory with the correct user permissions
int res = -1;
+ bool win32 = false;
+ switch (Environment.OSVersion.Platform) {
+ case PlatformID.Win32S:
+ case PlatformID.Win32Windows:
+ case PlatformID.Win32NT:
+ case PlatformID.WinCE:
+ win32 = true;
+ res = 0;
+ break;
+ }
+
do {
int num = rnd.Next ();
num++;
ownTempDir = Path.Combine (basedir, num.ToString("x"));
if (Directory.Exists (ownTempDir))
continue;
- res = mkdir (ownTempDir, 0x1c0);
+ if (win32)
+ Directory.CreateDirectory (ownTempDir);
+ else
+ res = mkdir (ownTempDir, 0x1c0);
if (res != 0) {
if (!Directory.Exists (ownTempDir))
throw new IOException ();