Ignore:
Timestamp:
11/07/14 17:51:01 (9 years ago)
Author:
Maciej Komosinski
Message:

Sources support both 32-bit and 64-bit, and more compilers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/nonstd_stdio.h

    r227 r247  
    77
    88bool fileExists(const char* path);
     9bool directoryExists(const char* path);
     10bool makeDirectory(const char* path);
     11bool makeDirectories(const char* path);
    912bool removeFile(const char* path);
    1013bool isAbsolutePath(const char* fname);
     14int getFileSize(const char* path);
    1115
    1216#ifdef _WIN32
     
    2428#ifndef MOBILE2D
    2529 #include <io.h> //borland compiler: include <io.h> before <dir.h> causes the SimWorld class in "simul.h" be unrecognized, for unknown reason :O moreover, this problem is only pertinent to the CLI project, not GUI. Maybe this is caused by global defines like NOVCL, NO_STRICT etc.?
    26  #define makeDirectory(name) mkdir(name)
     30// #define makeDirectory(name) mkdir(name)
    2731#endif
    2832
     33 #define S_ISDIR(x) ((x & _S_IFDIR)==_S_IFDIR)
    2934
    3035#else
     
    3237 #include <unistd.h>
    3338 #include <sys/stat.h>
    34  #define makeDirectory(name) mkdir(name,0777)
     39// #define makeDirectory(name) mkdir(name,0777)
    3540 #define _unlink unlink //_unlink jest ISO-conformant, unlink jest POSIX-deprecated
    36 
     41 #define _stat stat
    3742#endif
    3843
     
    95100#endif
    96101
     102int getFileSize(MFILE *f);
     103
    97104#endif
Note: See TracChangeset for help on using the changeset viewer.