mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Fix different declaration of mkdir between Watcom and DJGPP.
This commit is contained in:
@@ -60,7 +60,7 @@ void FileAttributes(const char* path)
|
|||||||
_dos_setdrive(driveNo, &total);
|
_dos_setdrive(driveNo, &total);
|
||||||
chdir("\\");
|
chdir("\\");
|
||||||
|
|
||||||
rc = mkdir("ATTRS");
|
rc = __dos_mkdir("ATTRS");
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void DeleteFiles(const char* path)
|
|||||||
_dos_setdrive(driveNo, &total);
|
_dos_setdrive(driveNo, &total);
|
||||||
chdir("\\");
|
chdir("\\");
|
||||||
|
|
||||||
rc = mkdir("DELETED");
|
rc = __dos_mkdir("DELETED");
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ void DirectoryDepth(const char* path)
|
|||||||
_dos_setdrive(driveNo, &total);
|
_dos_setdrive(driveNo, &total);
|
||||||
chdir("\\");
|
chdir("\\");
|
||||||
|
|
||||||
rc = mkdir("DEPTH");
|
rc = __dos_mkdir("DEPTH");
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@ void DirectoryDepth(const char* path)
|
|||||||
{
|
{
|
||||||
memset(&filename, 0, 9);
|
memset(&filename, 0, 9);
|
||||||
sprintf(&filename, "%08d", pos);
|
sprintf(&filename, "%08d", pos);
|
||||||
rc = mkdir(filename);
|
rc = __dos_mkdir(filename);
|
||||||
|
|
||||||
if(!rc) rc = chdir(filename);
|
if(!rc) rc = chdir(filename);
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,14 @@ Copyright (C) 2011-2021 Natalia Portillo
|
|||||||
#ifndef AARU_FSTESTER_SETTER_DOS_H
|
#ifndef AARU_FSTESTER_SETTER_DOS_H
|
||||||
#define 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)
|
#pragma pack(__push, 1)
|
||||||
|
|
||||||
typedef struct _Fat32FreeSpace
|
typedef struct _Fat32FreeSpace
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void Filenames(const char* path)
|
|||||||
_dos_setdrive(driveNo, &total);
|
_dos_setdrive(driveNo, &total);
|
||||||
chdir("\\");
|
chdir("\\");
|
||||||
|
|
||||||
rc = mkdir("FILENAME");
|
rc = __dos_mkdir("FILENAME");
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void MillionFiles(const char* path)
|
|||||||
_dos_setdrive(driveNo, &total);
|
_dos_setdrive(driveNo, &total);
|
||||||
chdir("\\");
|
chdir("\\");
|
||||||
|
|
||||||
rc = mkdir("MILLION");
|
rc = __dos_mkdir("MILLION");
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void Fragmentation(const char* path, size_t clusterSize)
|
|||||||
_dos_setdrive(driveNo, &total);
|
_dos_setdrive(driveNo, &total);
|
||||||
chdir("\\");
|
chdir("\\");
|
||||||
|
|
||||||
rc = mkdir("FRAGS");
|
rc = __dos_mkdir("FRAGS");
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ void Timestamps(const char* path)
|
|||||||
_dos_setdrive(driveNo, &total);
|
_dos_setdrive(driveNo, &total);
|
||||||
chdir("\\");
|
chdir("\\");
|
||||||
|
|
||||||
rc = mkdir("TIMES");
|
rc = __dos_mkdir("TIMES");
|
||||||
|
|
||||||
if(rc)
|
if(rc)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user