Fix different declaration of mkdir between Watcom and DJGPP.

This commit is contained in:
2021-03-11 02:39:08 +00:00
parent 138c55f887
commit 71cd201bbb
8 changed files with 16 additions and 8 deletions

View File

@@ -60,7 +60,7 @@ void FileAttributes(const char* path)
_dos_setdrive(driveNo, &total);
chdir("\\");
rc = mkdir("ATTRS");
rc = __dos_mkdir("ATTRS");
if(rc)
{

View File

@@ -67,7 +67,7 @@ void DeleteFiles(const char* path)
_dos_setdrive(driveNo, &total);
chdir("\\");
rc = mkdir("DELETED");
rc = __dos_mkdir("DELETED");
if(rc)
{

View File

@@ -62,7 +62,7 @@ void DirectoryDepth(const char* path)
_dos_setdrive(driveNo, &total);
chdir("\\");
rc = mkdir("DEPTH");
rc = __dos_mkdir("DEPTH");
if(rc)
{
@@ -78,7 +78,7 @@ void DirectoryDepth(const char* path)
{
memset(&filename, 0, 9);
sprintf(&filename, "%08d", pos);
rc = mkdir(filename);
rc = __dos_mkdir(filename);
if(!rc) rc = chdir(filename);

View File

@@ -32,6 +32,14 @@ Copyright (C) 2011-2021 Natalia Portillo
#ifndef AARU_FSTESTER_SETTER_DOS_H
#define AARU_FSTESTER_SETTER_DOS_H
#if defined(__WATCOM__)
#include <direct.h>
#define __dos_mkdir(a) mkdir(a)
#elif defined(__DJGPP__)
#include <sys/stat.h>
#define __dos_mkdir(path) mkdir(path, 0)
#endif
#pragma pack(__push, 1)
typedef struct _Fat32FreeSpace

View File

@@ -63,7 +63,7 @@ void Filenames(const char* path)
_dos_setdrive(driveNo, &total);
chdir("\\");
rc = mkdir("FILENAME");
rc = __dos_mkdir("FILENAME");
if(rc)
{

View File

@@ -63,7 +63,7 @@ void MillionFiles(const char* path)
_dos_setdrive(driveNo, &total);
chdir("\\");
rc = mkdir("MILLION");
rc = __dos_mkdir("MILLION");
if(rc)
{

View File

@@ -67,7 +67,7 @@ void Fragmentation(const char* path, size_t clusterSize)
_dos_setdrive(driveNo, &total);
chdir("\\");
rc = mkdir("FRAGS");
rc = __dos_mkdir("FRAGS");
if(rc)
{

View File

@@ -70,7 +70,7 @@ void Timestamps(const char* path)
_dos_setdrive(driveNo, &total);
chdir("\\");
rc = mkdir("TIMES");
rc = __dos_mkdir("TIMES");
if(rc)
{