Skip to content

Commit

Permalink
try to fixed mkdir in postix
Browse files Browse the repository at this point in the history
  • Loading branch information
nodtem66 committed Feb 15, 2020
1 parent f98454c commit 25a0c7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ file(GLOB MAIN_SOURCES
"${PROJECT_SOURCE_DIR}/include/*/*.hpp"
)
update_deps_file("main_sources" "${MAIN_SOURCES}")

add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES -DDIP__IS_STATIC -DDIP__ENABLE_ASSERT -DDIP__HAS_JPEG -DDIP__EXCEPTIONS_RECORD_STACK_TRACE)
add_executable(${PROJECT_NAME} ${MAIN_SOURCES} ${VCG_INCLUDE_DIR}/wrap/ply/plylib.cpp)
target_include_directories(${PROJECT_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/include" ${VCG_INCLUDE_DIR} ${DIPlib_INCLUDE_DIR})
Expand Down
9 changes: 6 additions & 3 deletions include/Scaffolder_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
#include "implicit_function.h"
#include "Mesh.h"

#ifndef _WIN32
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#endif

#define VERSION "v1.2"
#define PROGRESS_BAR_COLUMN 40

Expand Down Expand Up @@ -146,9 +152,6 @@ int make_dir(std::string& str) {
mbstowcs(wc, str.c_str(), str.size());
return _wmkdir(wc);
#else
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
return mkdir(str.c_str(), 0733);
#endif
}

0 comments on commit 25a0c7f

Please sign in to comment.