1
0
forked from 0ad/0ad

More FreeBSD build fixes.

Fixes some warnings about files that don't end with newline.

This was SVN commit r10991.
This commit is contained in:
historic_bruno 2012-01-30 06:21:11 +00:00
parent 2d0e8021aa
commit fc27a5c0ea
13 changed files with 42 additions and 38 deletions

View File

@ -732,35 +732,26 @@ function setup_main_exe ()
-- see manifest.cpp
project_add_manifest()
elseif os.is("linux") then
elseif os.is("linux") or os.is("bsd") then
-- Libraries
links {
"fam",
-- Utilities
"rt",
-- Dynamic libraries (needed for linking for gold)
"dl",
}
-- Threading support
buildoptions { "-pthread" }
linkoptions { "-pthread" }
-- For debug_resolve_symbol
configuration "Debug"
linkoptions { "-rdynamic" }
configuration { }
elseif os.is("bsd") then
-- Libraries
links {
"fam",
"execinfo",
-- Utilities
"rt",
}
if os.is("linux") then
links {
-- Dynamic libraries (needed for linking for gold)
"dl",
}
elseif os.is("bsd") then
links {
-- Needed for backtrace* on FreeBSD
"execinfo",
}
end
-- Threading support
buildoptions { "-pthread" }
@ -1147,6 +1138,11 @@ function setup_tests()
-- Dynamic libraries (needed for linking for gold)
"dl",
}
elseif os.is("bsd") then
links {
-- Needed for backtrace* on FreeBSD
"execinfo",
}
end
-- Threading support

View File

@ -49,9 +49,13 @@
configuration "vs*"
defines { "_CRT_SECURE_NO_WARNINGS" }
configuration "bsd"
defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" }
links { "m" }
configuration "linux"
defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" }
links { "m", "dl" }
links { "m", "dl" }
configuration "macosx"
defines { "LUA_USE_MACOSX" }

View File

@ -63,4 +63,4 @@ public:
static std::vector<STerritoryBoundary> ComputeBoundaries(const Grid<u8>* territories);
};
#endif
#endif // INCLUDED_TERRITORYBOUNDARY

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010 Wildfire Games
/* Copyright (c) 2012 Wildfire Games
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -24,7 +24,7 @@
#include "precompiled.h"
#if OS_LINUX
#if OS_LINUX || OS_BSD
# define HAVE_X 1
#else
# define HAVE_X 0

View File

@ -104,4 +104,4 @@ public:
static const CBoundingBoxOriented EMPTY;
};
#endif // INCLUDED_BOX
#endif // INCLUDED_BOX

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2012 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -25,7 +25,7 @@
#endif
#include "lib/precompiled.h"
#if OS_LINUX
#if OS_LINUX || OS_BSD
#include "mocks/dlfcn.h"
#include "mocks/unistd.h"
#endif // OS_LINUX

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2012 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -28,7 +28,7 @@
// Cause calls to be redirected to the real function by default
#define DEFAULT(name) static T::Real_##name real_##name
#if OS_LINUX
#if OS_LINUX || OS_BSD
#include "mocks/dlfcn.h"
DEFAULT(dladdr);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games.
/* Copyright (C) 2012 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -27,4 +27,4 @@ void CompressZLib(const std::string& data, std::string& out, bool includeLengthH
void DecompressZLib(const std::string& data, std::string& out, bool includeLengthHeader);
#endif // INCLUDED_COMPRESS
#endif // INCLUDED_COMPRESS

View File

@ -714,7 +714,7 @@ void Shutdown(int UNUSED(flags))
#if OS_UNIX
static void FixLocales()
{
#if OS_MACOSX
#if OS_MACOSX || OS_BSD
// OS X requires a UTF-8 locale in LC_CTYPE so that *wprintf can handle
// wide characters. Peculiarly the string "UTF-8" seems to be acceptable
// despite not being a real locale, and it's conveniently language-agnostic,

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2012 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -27,4 +27,4 @@ BEGIN_INTERFACE_WRAPPER(Selectable)
DEFINE_INTERFACE_METHOD_1("SetSelectionHighlight", void, ICmpSelectable, SetSelectionHighlight, CColor)
END_INTERFACE_WRAPPER(Selectable)
bool ICmpSelectable::ms_EnableDebugOverlays = false;
bool ICmpSelectable::ms_EnableDebugOverlays = false;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games.
/* Copyright (C) 2012 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -245,4 +245,4 @@ template<> jsval ScriptInterface::ToJSVal<Grid<u8> >(JSContext* cx, const Grid<u
template<> jsval ScriptInterface::ToJSVal<Grid<u16> >(JSContext* cx, const Grid<u16>& val)
{
return ToJSVal_Grid<js::TypedArray::TYPE_UINT16>(cx, val);
}
}

View File

@ -37,6 +37,10 @@
#undef DEBUG
#if defined(__FreeBSD__)
// Fix undefined PF_INET on FreeBSD
#include <sys/socket.h>
#endif
// Copyright (c) 2004-2011 Sergey Lyubka
//

View File

@ -57,7 +57,7 @@ MESSAGEHANDLER(InitGraphics)
{
UNUSED2(msg);
#if OS_LINUX || OS_MACOSX || (OS_WIN && !CONFIG2_WSDL)
#if OS_UNIX || (OS_WIN && !CONFIG2_WSDL)
// When using GLX (Linux), SDL has to load the GL library to find
// glXGetProcAddressARB before it can load any extensions.
// When running in Atlas, we skip the SDL video initialisation code