Commit graph

12 commits

Author SHA1 Message Date
Leonardo de Moura
0556412f8d refactor(*): add runtime folder
@kha The runtime folder includes what is needed to link a
standalone Lean program. It is still contains some unnecessary files.
We will be able to remove them after we release Lean4.
2018-05-14 14:23:56 -07:00
Nuno Lopes
caab1c58d2 fix(build): style 2018-02-06 10:11:10 -08:00
Nuno Lopes
ac6a16ddba feat(msvc): further work on MSVC compatibility 2018-02-06 10:11:09 -08:00
Nuno Lopes
0d820fa23d fix(build): fix Cygwin build 2018-01-22 18:07:04 -08:00
Leonardo de Moura
7e0612306f fix(util/file_lock): issue on Windows 2016-12-20 14:16:58 -08:00
Gabriel Ebner
80cd6205d7 fix(util/file_lock): disable file locks in emscripten 2016-10-16 14:41:35 -07:00
Gabriel Ebner
7e11c5cf6e fix(src/util/file_lock): ignore failure to create locks on read-only file systems
EACCES is already ignored when creating lock files.  In this case we
assume that the file to be locked is part of the system-wide
installation.  On NixOS however, the file system containing system
packages is mounted read-only, and open(2) returns EROFS.
2016-01-16 11:00:44 -08:00
Soonho Kong
f911747b60 fix(util/file_lock.cpp): add 'include <fcntl.h>'
@wizardbc found that this is needed while working on lean.js.
I think it's because of the use of O_CREAT in open system call.

Related issue: leanprover/lean.js#10
2015-12-19 07:51:00 -05:00
Leonardo de Moura
c07345d47f fix(util/file_lock): handle permission denied at lock creation
see #925

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2015-12-15 09:48:20 -08:00
Leonardo de Moura
521657914c chore(util/file_lock): style 2015-12-14 10:20:33 -08:00
Leonardo de Moura
31c9a76777 feat(util/file_lock): add support for Windows
Remark: the lock are not being erased on Windows.
I tried different solutions based on MoveFileEx and DeleteFile.
None of them worked. The one based on MoveFileEx

        MoveFileEx(m_fname.c_str(), NULL, MOVEFILE_DELAY_UNTIL_REBOOT);

seems to delete the file after REBOOT.
But, this is not very useful.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2015-12-14 10:07:26 -08:00
Leonardo de Moura
4dc3764a02 feat(util,library,shell): basic locking mechanism
We still have to test on Windows.
see issue #925
2015-12-12 21:26:13 -08:00