Ticket #2804: freebsd10.diff

File freebsd10.diff, 4.1 KB (added by leper, 10 years ago)

Patch for FreeBSD 10.0

  • 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()
     
    357361                win_names  = { "libiconv" },
    358362                -- TODO: glibc provides symbols for this, so we should only include that (and depend on libiconv) on non-glibc unix
    359363                osx_names = { "iconv" },
     364                bsd_names = { "iconv" },
    360365                dbg_suffix = "",
    361366            })
    362367        end,
  • build/premake/premake4.lua

     
    3737
    3838dofile("extern_libs4.lua")
    3939
     40cc = os.getenv("CC")
     41if cc == nil or cc == "" then
     42    -- TODO check if gcc exists and not on OS X
     43    --      else use clang if present
     44    cc = "gcc"
     45end
     46
    4047-- detect CPU architecture (simplistic, currently only supports x86, amd64 and ARM)
    4148arch = "x86"
    4249if _OPTIONS["android"] then
     
    5057    if arch == "x86_64" or arch == "amd64" then
    5158        arch = "amd64"
    5259    else
    53         os.execute("gcc -dumpmachine > .gccmachine.tmp")
     60        os.execute(cc .. " -dumpmachine > .gccmachine.tmp")
    5461        local f = io.open(".gccmachine.tmp", "r")
    5562        local machine = f:read("*line")
    5663        f:close()
     
    108115    -- It's too late to do this test by the time we start compiling the PCH file, so
    109116    -- do the test in this build script instead (which is kind of ugly - please fix if
    110117    -- you have a better idea)
    111     if not _OPTIONS["icc"] then
     118    if not _OPTIONS["icc"] and cc == "gcc" then
    112119        os.execute("gcc -dumpversion > .gccver.tmp")
    113120        local f = io.open(".gccver.tmp", "r")
    114121        major, dot, minor = f:read(1, 1, 1)
     
    392399    if not os.is("windows") and not os.is("macosx") then
    393400        -- X11 includes may be installed in one of a gadzillion of three places
    394401        -- Famous last words: "You can't include too much! ;-)"
     402        -- TODO update comment (or add /usr/local/ as an include search path for BSDs)
    395403        includedirs {
    396404            "/usr/X11R6/include/X11",
    397405            "/usr/X11R6/include",
     406            "/usr/local/include/X11",
     407            "/usr/local/include",
    398408            "/usr/include/X11"
    399409        }
    400410        libdirs { "/usr/X11R6/lib" }
  • 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