mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Fix several compiler problems with clang on Mac OS X 10.10 SDK
This commit is contained in:
parent
8adbae888f
commit
2d61412c68
@ -15,6 +15,7 @@
|
||||
#include "base/path.h"
|
||||
#include "base/replace_string.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <vector>
|
||||
|
||||
namespace app {
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "base/fs.h"
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
#include <vector>
|
||||
|
||||
namespace app {
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "base/string.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace app {
|
||||
|
||||
@ -126,7 +127,7 @@ void ResourceFinder::includeHomeDir(const char* filename)
|
||||
|
||||
#else
|
||||
|
||||
char* env = getenv("HOME");
|
||||
char* env = std::getenv("HOME");
|
||||
char buf[4096];
|
||||
|
||||
if ((env) && (*env)) {
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include "base/launcher.h"
|
||||
#include "base/string.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifndef SEE_MASK_DEFAULT
|
||||
@ -77,11 +79,11 @@ bool open_file(const std::string& file)
|
||||
|
||||
#elif __APPLE__
|
||||
|
||||
ret = system(("open \"" + file + "\"").c_str());
|
||||
ret = std::system(("open \"" + file + "\"").c_str());
|
||||
|
||||
#else
|
||||
|
||||
ret = system(("xdg-open \"" + file + "\"").c_str());
|
||||
ret = std::system(("xdg-open \"" + file + "\"").c_str());
|
||||
|
||||
#endif
|
||||
|
||||
@ -107,17 +109,17 @@ bool open_folder(const std::string& file)
|
||||
|
||||
int ret;
|
||||
if (base::is_directory(file)) {
|
||||
ret = system(("open \"" + file + "\"").c_str());
|
||||
ret = std::system(("open \"" + file + "\"").c_str());
|
||||
}
|
||||
else {
|
||||
ret = system(("open --reveal \"" + file + "\"").c_str());
|
||||
ret = std::system(("open --reveal \"" + file + "\"").c_str());
|
||||
}
|
||||
return (ret == 0);
|
||||
|
||||
#else
|
||||
|
||||
int ret;
|
||||
ret = system(("xdg-open \"" + file + "\"").c_str());
|
||||
ret = std::system(("xdg-open \"" + file + "\"").c_str());
|
||||
return (ret == 0);
|
||||
|
||||
#endif
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <iterator>
|
||||
|
||||
namespace base {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Config Library
|
||||
// Copyright (c) 2014 David Capello
|
||||
// Copyright (c) 2014, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -13,6 +13,7 @@
|
||||
#include "base/file_handle.h"
|
||||
#include "base/string.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "SimpleIni.h"
|
||||
|
||||
namespace cfg {
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "doc/palette.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#define PROCOL_MAGIC_NUMBER 0xB123
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "base/disable_copying.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace net {
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "base/string.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -121,7 +122,7 @@ Accelerator::Accelerator(const std::string& str)
|
||||
else {
|
||||
// F1, F2, ..., F11, F12
|
||||
if (tok[0] == 'f' && (tok.size() <= 3)) {
|
||||
int num = strtol(tok.c_str()+1, NULL, 10);
|
||||
int num = std::strtol(tok.c_str()+1, NULL, 10);
|
||||
if ((num >= 1) && (num <= 12))
|
||||
m_scancode = (KeyScancode)((int)kKeyF1 + num - 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user