Ticket #2804: 0ad.diff

File 0ad.diff, 4.8 KB (added by Guido Falsi, 10 years ago)

cumulative diff with changes discussed

  • build/premake/extern_libs4.lua

     
    235235                -- Suppress all the Boost warnings on OS X by including it as a system directory
    236236                buildoptions { "-isystem../" .. libraries_dir .. "boost/include" }
    237237            end
    238             if os.getversion().description == "OpenBSD" then
     238            -- TODO This actually applies to most libraries we use on BSDs, make this a global setting.
     239            if os.is("bsd") then
    239240                includedirs { "/usr/local/include" }
    240241            end
    241242        end,
     
    347348            elseif os.is("macosx") then
    348349                add_default_include_paths("iconv")
    349350                defines { "LIBICONV_STATIC" }
     351            -- TODO Check OpenBSD
     352            elseif os.getversion().description == "FreeBSD" then
     353                defines { "HAVE_ICONV_CONST" }
    350354            end
    351355        end,
    352356        link_settings = function()
     
    359363                osx_names = { "iconv" },
    360364                dbg_suffix = "",
    361365            })
     366            -- FreeBSD 10 and up have iconv in libc
     367            -- TODO: Check other BSDs
     368            if(not (os.getversion().description == "FreeBSD" and os.getversion().majorversion >= 10)) then
     369                add_default_links({
     370                    bsd_names = { "iconv" }
     371                })
     372            end
    362373        end,
    363374    },
    364375    icu = {
  • build/premake/premake4.lua

     
    3838
    3939dofile("extern_libs4.lua")
    4040
     41cc = os.getenv("CC")
     42if cc == nil or cc == "" then
     43    -- TODO check if gcc exists and not on OS X
     44    --      else use clang if present
     45    cc = "gcc"
     46end
     47
    4148-- detect CPU architecture (simplistic, currently only supports x86, amd64 and ARM)
    4249arch = "x86"
    4350if _OPTIONS["android"] then
     
    5158    if arch == "x86_64" or arch == "amd64" then
    5259        arch = "amd64"
    5360    else
    54         os.execute("gcc -dumpmachine > .gccmachine.tmp")
     61        os.execute(cc .. " -dumpmachine > .gccmachine.tmp")
    5562        local f = io.open(".gccmachine.tmp", "r")
    5663        local machine = f:read("*line")
    5764        f:close()
     
    109116    -- It's too late to do this test by the time we start compiling the PCH file, so
    110117    -- do the test in this build script instead (which is kind of ugly - please fix if
    111118    -- you have a better idea)
    112     if not _OPTIONS["icc"] then
     119    if not _OPTIONS["icc"] and cc == "gcc" then
    113120        os.execute("gcc -dumpversion > .gccver.tmp")
    114121        local f = io.open(".gccver.tmp", "r")
    115122        major, dot, minor = f:read(1, 1, 1)
     
    393400    if not os.is("windows") and not os.is("macosx") then
    394401        -- X11 includes may be installed in one of a gadzillion of three places
    395402        -- Famous last words: "You can't include too much! ;-)"
     403        -- TODO update comment (or add /usr/local/ as an include search path for BSDs)
    396404        includedirs {
    397405            "/usr/X11R6/include/X11",
    398406            "/usr/X11R6/include",
     407            "/usr/local/include/X11",
     408            "/usr/local/include",
    399409            "/usr/include/X11"
    400410        }
    401         libdirs { "/usr/X11R6/lib" }
     411        libdirs {
     412            "/usr/X11R6/lib",
     413            "/usr/local/lib"
     414         }
    402415    end
    403416end
    404417
  • libraries/source/fcollada/src/FCollada/FUtils/FUStringConversion.cpp

     
    247247template FMVector4 FUStringConversion::ToVector4<char>(const char**);
    248248
    249249template bool FUStringConversion::ToBoolean<char>(const char*);
     250template int FUStringConversion::ToInt32<char>(const char**);
    250251template unsigned int FUStringConversion::ToUInt32<char>(const char**);
    251252template unsigned int FUStringConversion::HexToUInt32<char>(const char**, unsigned int);
    252253
  • source/tools/atlas/AtlasUI/ScenarioEditor/Tools/TransformObject.cpp

     
    158158                    wxString x(xmlData->GetNodeContent());
    159159                    unsigned long xTmp = 0;
    160160                    x.ToULong(&xTmp);
    161                     wxASSERT(xTmp <= (unsigned long)UINT32_MAX);
     161                    wxASSERT(xTmp <= (unsigned long)std::numeric_limits<unsigned int>::max());
    162162                    actorSeed = xTmp;
    163163                }
    164164
  • source/tools/atlas/GameInterface/Handlers/EnvironmentHandlers.cpp

     
    146146    void Do()
    147147    {
    148148        m_OldSettings = GetSettings();
    149         m_NewSettings = msg->settings;
     149        m_NewSettings = msg->settings._Unwrap();
    150150        Redo();
    151151    }
    152152