common: port: move filesystem related macros to filesystem module, try to include less globally for faster builds

This commit is contained in:
Alibek Omarov
2025-10-08 05:03:29 +05:00
parent 0a5a081a9d
commit 3d132e0e83
7 changed files with 112 additions and 121 deletions

View File

@@ -51,6 +51,18 @@ GNU General Public License for more details.
#define FILE_COPY_SIZE (1024 * 1024)
#define SAVE_AGED_COUNT 2 // the default count of quick and auto saves
#if !defined( O_BINARY )
#define O_BINARY 0
#endif // !defined( O_BINARY )
#if !defined( O_TEXT )
#define O_TEXT 0
#endif // !defined( O_TEXT )
#if !XASH_PSVITA && !XASH_NSWITCH
#define HAVE_DUP
#endif // !XASH_PSVITA && !XASH_NSWITCH
fs_globals_t FI;
poolhandle_t fs_mempool;
char fs_rootdir[MAX_SYSPATH];
@@ -357,7 +369,11 @@ void FS_CreatePath( char *path )
// create the directory
save = *ofs;
*ofs = 0;
_mkdir( path );
#if XASH_WIN32
_mkdir( path ); // use _wmkdir maybe?
#else // !XASH_WIN32
mkdir( path, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH );
#endif // !XASH_WIN32
*ofs = save;
}
}