mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Detect mode_t for safe use of chmod, and for scons/msvc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15985 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cac3941537
commit
c8429d4bbc
@ -1018,6 +1018,7 @@ return std::count(a, a+5, 'l');
|
||||
('std::istreambuf_iterator<std::istream>', 'HAVE_DECL_ISTREAMBUF_ITERATOR',
|
||||
'#include <streambuf>\n#include <istream>'),
|
||||
('wchar_t', 'HAVE_WCHAR_T', None),
|
||||
('mode_t', 'HAVE_MODE_T', "#include <sys/types.h>"),
|
||||
],
|
||||
libs = [
|
||||
('gdi32', 'HAVE_LIBGDI32'),
|
||||
|
@ -33,7 +33,7 @@ using std::string;
|
||||
|
||||
bool lyx::support::chmod(string const & file, unsigned long int mode)
|
||||
{
|
||||
#ifdef HAVE_CHMOD
|
||||
#if defined (HAVE_CHMOD) && defined (HAVE_MODE_T)
|
||||
if (::chmod(file.c_str(), mode_t(mode)) != 0)
|
||||
return false;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user