1
0
forked from 0ad/0ad
Commit Graph

93 Commits

Author SHA1 Message Date
8c068aab07 Removes possibility to link lowlevel library dynamically.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4470
This was SVN commit r26281.
2022-01-31 06:53:30 +00:00
1e18a93302 Removes using shared_ptr to make STL usages consistent.
Differential Revision: https://code.wildfiregames.com/D4005
This was SVN commit r25533.
2021-05-23 22:01:18 +00:00
416cc90c3e Drop support for compiling with Visual Studio 2015
Ahead of the SM68 migration, where we will need to use VS17, drop
support for compiling with VS16.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3158
This was SVN commit r24286.
2020-11-28 16:54:48 +00:00
Angen
d33f1c7321 Remove not needed checks and code for VS2015 [VS2013 -> VS2015]
Some pragma warnings are not more needed for VS2015 compilation this
removes them.
Removing some specific code for older version than VS2015.
Forcing build to fail if compiling with VS older than VS2015.

Differential Revision: https://code.wildfiregames.com/D1396
Reviewed by: @Itms
This was SVN commit r23416.
2020-01-19 12:43:41 +00:00
Angen
5ad75fa580 Precompiled logic update [Windows build]
Nuke HAVE_PCH and use only one macro for PCH logic.
This macro is enabled (=1) or disabled (=0) based on --without-pch and
no_pch parameters in premake5
Visual studio does not more override this logic

Differential Revision: https://code.wildfiregames.com/D1380
Reviewed by: @Itms
This was SVN commit r23314.
2019-12-31 13:58:48 +00:00
65fcd66556 Update precompiled headers to improve build times.
Expect a 10-25% build time improvement.

Original Patch By: Angen
Reviewed By: Angen
References #5038

Differential Revision: https://code.wildfiregames.com/D1333
This was SVN commit r22303.
2019-05-26 07:21:12 +00:00
43137fef3f Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c).
Differential Revision: https://code.wildfiregames.com/D716
Refs 09e974e1cb
Reviewed By: bb
Change in agreement with leper.

This was SVN commit r19899.
2017-07-10 14:26:24 +00:00
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
4c1903500b Switch to std::shared_ptr and std::weak_ptr.
This was SVN commit r16227.
2015-01-25 03:10:58 +00:00
0843100d11 Remove partial emulation of some C++11 features for older compilers.
This was SVN commit r16226.
2015-01-24 20:37:18 +00:00
b82913ea14 make explicit that both iterator debugging and _SECURE_SCL (which is less than iterator debugging) are disabled in release builds
This was SVN commit r9476.
2011-05-07 16:46:28 +00:00
1eb5eeb225 minor fixes from integration with working copy at work.
This was SVN commit r9116.
2011-03-24 09:05:06 +00:00
6d25329412 # towards locale-independent pathnames on Linux
c.f.
http://www.wildfiregames.com/forum/index.php?showtopic=14541&st=0&p=217250&#entry217250
and 2011-03-19 meeting

This was SVN commit r9090.
2011-03-21 17:53:13 +00:00
fd46b9e370 fixes/improvements from work:
file/wfilesystem: avoid error dialog when opening a file that doesn't
exist
precompiled/pch_warnings: remove push/pop that prevented our warning
disables to applying to other code. update comments
topology: refactor APIC field access and add support for constructing
APIC ID from topology
waio: add file_attribute_normal
wsysdep: slightly safer sys_generate_random_bytes implementation

This was SVN commit r8869.
2011-01-28 13:40:07 +00:00
002e3f5606 minor fixes from work; also add sys_WideFromArgv
This was SVN commit r8856.
2011-01-04 19:53:38 +00:00
ba2a9d7af3 improvements from work: [update-workspaces required]
- split precompiled.h into several headers (simplifies reuse)
- enable additional warnings not in W4
- split ErrorReaction into ErrorReactionInternal - clarifies which
values can actually be returned by debug_DisplayError
- wsdl: slightly safer HDC usage via CS_OWNDC, avoid dipping into DC
cache via ValidateRect instead of BeginPaint; remove unused thread
create
- StdDeserializer - wasn't including byte_order => BYTE_ORDER was
undefined
- wsysdep: clean up error dialog message handling

This was SVN commit r8828.
2010-12-09 11:16:21 +00:00
825bbf8f51 parallel studio 2011 warning fixes
This was SVN commit r8484.
2010-10-28 12:22:11 +00:00
f79056efbd fix CPU topology problem under VMs reported by Philip (update workspaces required)
also moved lib.h's code generation macros into a separate file to break
a circular dependency with lib.h's use of debug_assert, and added a stub
implementation of sysdep/numa.h

This was SVN commit r7808.
2010-07-25 17:10:57 +00:00
159b96c1a1 MSVC warning fixes
This was SVN commit r7585.
2010-05-25 19:41:18 +00:00
1e40c8c776 MSVC warning fixes
This was SVN commit r7583.
2010-05-25 19:12:00 +00:00
ef602c3dfd fixes/improvements from work
- improved form of noncopyable that avoids inheritance warnings
- PCH updates to allow more restrictive MINIMAL_PCH
sound/SoundGroup.cpp: fix copy-paste error

This was SVN commit r7498.
2010-05-03 12:27:39 +00:00
b4f680594b fixes from work:
- correct AllocateAligned deleter and alignment value
- workaround for boost #pragma pack warnings
add DivideRoundUp

This was SVN commit r7439.
2010-04-06 12:06:02 +00:00
c2fd939898 license change to the more permissible Expat/MIT license for lib/ (see forum thread)
This was SVN commit r7316.
2010-02-08 16:23:39 +00:00
7c2e9027c2 # Rewrite of the game's simulation system
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)

This was SVN commit r7259.
2010-01-09 19:20:14 +00:00
7738eecbb0 icc build fix
This was SVN commit r7204.
2009-11-16 23:45:56 +00:00
d83945e1e7 Annotate functions that have printf-style format strings, for compile-time type checking (see #293)
This was SVN commit r7072.
2009-08-04 13:31:41 +00:00
1743645fd3 Simplify the overly-complex CppDoc-breaking file headers
This was SVN commit r6832.
2009-04-18 17:51:05 +00:00
214b0e6683 Removed outdated licensing information
This was SVN commit r6831.
2009-04-18 17:17:34 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
60f48f558d # infrastructure improvements
make off_t pointer-sized (required for >4gb files at work)
add shared_ptr deleter for free(), add ASSUME_ALIGNED, warning fixes

This was SVN commit r6826.
2009-04-18 08:41:10 +00:00
16ccae10cd # fix warnings
more icc11 fixes - mostly type conversion and noncopyable (now made a
macro)

This was SVN commit r6536.
2008-12-17 16:32:46 +00:00
f7d5711623 additions from work:
add shared_ptr wrapper for numa_allocator and page_aligned_alloc
(removing previous code from shared_ptr.cpp)
pch: add TR1 array
wposix: add setenv
wtime: add strptime

This was SVN commit r6486.
2008-11-20 16:35:30 +00:00
4132549c2c 64-bit fixes (the parts of lib/ in use at work are now fully operational in 64-bit mode)
- x86_x64.cpp: fix: test ARCH_AMD64 instead of ARCH_IA32 because both
are defined on x64
- manifest.cpp: fix processor architecture
- wdbg_heap.cpp: only enable on ia32
- winit, wstartup: take (lack of) name mangling into account

compiler.h: add STRINGIZE and DECORATED_NAME for use by winit
dir_watch: fix: smart pointers were never actually released due to a
remaining reference

This was SVN commit r6375.
2008-09-16 17:46:45 +00:00
a3b7e8c08c needed unicode at work:
debug: reinstate wchar_t version of debug_printf
  file, waio: add hack to allow creating File_Posix with unicode path
wposix: no longer include some rarely-used stuff to avoid conflict with
3rd party libraries
precompiled: bring boost::bind into global namespace (present in TR1)

dir_watch: needed directory watching with unicode paths and larger
buffers at work, so I completely overhauled and documented this

timer: add ToSeconds

SocketBase: fix to ensure correct match despite ::bind's conflict with
boost::bind

This was SVN commit r6319.
2008-08-09 19:22:13 +00:00
fbc3d22720 Use GCC's std::tr1::unordered_* classes instead of the now-deprecated __gnu_cxx::hash_* when possible
This was SVN commit r6250.
2008-07-19 00:20:54 +00:00
5d80d2ee5d fixes+improvements from work:
- add AlignedAllocator - an STL allocator that returns
cache-line-aligned objects (required to avoid RFOs when threads write to
various independent items in a container)
- bits: bit_mask can now be used for N=0..numBits (works around
full-word-shifts-are-undefined issue)
- precompiled.h: remove scoped_ptr, add function-related stuff from TR1
- numa:
  . add numa_IsMemoryInterleaved
  . numa_Allocate is now able to allocate large pages as well (reduces
TLB misses)
- os_cpu: interface change to support 32-bit apps running on WoW64
systems with > 4 GB of memory
- topology: use new x86_x64_EnumerateCaches API; fix detection of cache
ID
- x86_x64: provide the means of enumerating all caches returned by CPUID
and detect L1 cache size

This was SVN commit r6004.
2008-06-01 08:25:12 +00:00
04127c7af3 fixes/improvements to lib code from work
- topology.cpp: modify interface due to thread-safety issue. caller is
now responsible for ensuring the first _Detect call isn't reentered;
everything else is safe.
- fix thread-safety issue in wnuma; use winit mechanism to ensure it's
ready before use
- VFS now takes a cacheSize parameter (required for being able to
disable read-only file caches for the image loader at work)
- allow dynarray that isn't actually holding memory
- debug_stl: VC9 fix (disable this code except on the exact STL version
on which it was tested)
- zlib, lib_api: changes to macro used to toggle between static and
dynamic linking
- add boost filesystem header in external_libraries
- amd64: cpu_ topology functions are now provided by x86_x64
- cpu: remove cpu_ClockFrequency (dangerous, may be tempting to use
during WHRT init which would cause a crash). use x86_x64_ClockFrequency
or os_cpu_ClockFrequency instead.
- werrno: cope with newer boost versions
- wmman: follow SUSv3 in rejecting zero-length mappings

This was SVN commit r5954.
2008-05-13 19:43:02 +00:00
cc243f67eb fixes/improvements made at work:
- fix lots of 64-bit warnings
- round_up/down now templates
- avoid warning with definition of byte swap functions; remove
duplication of that in wsdl
- codec_zlib.cpp: avoid domination warning
- vfs/file_cache: VFS is now responsible for handling zero-length files
(no longer considered an error; just returns zero pointer and size=0)
- cpu: export all functions (thus obviating cpu_memcpy_thunk). this
required renaming asm functions and adding thunk functions that call
them
- winit: fix segment merge statement, reinstate /include (otherwise init
functions are stripped by linker)
- wstartup: VC CRT init section definitions have changed in amd64 build;
match their definition
- wsysdep.cpp: more descriptive text for osError = 0

This was SVN commit r5899.
2008-05-01 15:41:42 +00:00
a915bdc1b6 fix problems related to 64-bit compilation in lib
. dbghelp is now pulled in by a separate external_libraries header
. disable _SECURE_SCL (improves perf)
. amd64: initial implementation of essential functions, not yet complete
. manifest: disabled on ICC because its IPO module incorrectly
interprets /manifestdependency
. wdbg_sym: no longer support stack walks on non-ia32 win2k (avoids
trouble due to mixing SEH and dtors)
. winit and wstartup: had to remove forced symbol include - does not
link otherwise on ICC (for reasons unknown). function pointers are
actually included and called on x64 windows (compiling with MSC)

This was SVN commit r5895.
2008-04-19 18:10:00 +00:00
9269be9ee3 remove mmgr and macros that redefine malloc/new/free
(see http://www.wildfiregames.com/forum/index.php?showtopic=11450&hl= )

clean up debug module
. no longer include platform-dependent header (-> less rebuilds)
. DISPLAY_ERROR -> DEBUG_DISPLAY_ERROR
. parts of config.h that don't affect all files moved to config.2 (->
fewer full rebuilds)
. remove creaky symbol cache (no longer needed for mmgr)
. remove TLS thread naming stuff (can use debugger's thread window
instead; no need for platform independence there)

wdbg: remove thread suspension and breakpoint APIs (not needed)

acpi: fix: u64 -> uintptr_t

wutil: fix WinScopedLock, use that instead of direct lock() functions

misc:
. get rid of SAFE_STRCPY, replace with strcpy_s
. remove _getcwd (shouldn't be used)

This was SVN commit r5563.
2008-01-19 11:33:11 +00:00
2c2a394a1e Fixed allocators.h reference. Fixed repeated warning in GCC.
This was SVN commit r5535.
2008-01-07 02:06:27 +00:00
2e5d9452aa part2: misc source/lib fixes/improvements
move all except user-specified config choices out of config.h and into
appropriate headers
CPU_IA32 -> ARCH_IA32
wsdl: disable use of ddraw (will soon be replaced by WMI)

use shared_ptr without namespace qualifier (it's in tr1)
debug_warn -> debug_assert(0)
LIB_API to allow building as DLL
smart pointers: reduce use of .get()
cache_adt: use map instead of hash_map (avoids needing a hashCompare
class). also remove spurious warning
code_annotation.h: better cassert implementation
move FPS measuring portion of timer.cpp into frequency_filter
move include of memory headers into mmgr.h (to avoid errors, we must
ensure they are included if mmgr is used)
posix_filesystem.h: move definition of mkdir to wfilesystem
stl: disable iterator checks in release mode
wmi: fix COM init bug, use smart pointers
wutil: add code to get DLL module handle (if compiled as such), add
WinScopedLock
timer: fix handling of raw ticks

This was SVN commit r5517.
2007-12-20 20:09:19 +00:00
d19a2cba65 include boost smart pointers from PCH
factor out the "atom_fn" mechanism into lib/allocators/string_pool.cpp
factor out FAT date/time handling into lib/fat_time.cpp
path_util: replace strcpy with SAFE_STRCPY; add additional functions
that avoid passing an output buffer via StringPool

This was SVN commit r5474.
2007-11-20 18:44:36 +00:00
80057a82e5 patch, gameview: fix typos, revise according to coding convention
improve CPU brand string detection
wposix: no more ONCE during init (not thread-safe). also remove
redundant round_up
fold string_s into secure_crt

vfs: small fixes+commenting improvements while calling VFS back into
memory

This was SVN commit r5054.
2007-05-10 20:47:17 +00:00
a34b759720 . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it.
. timer, config: fix definition of ALLOW_RDTSC
. add movsx_be64 (for whirlpool), revise implementation, move to
byte_order, add test
. MAX -> std::max, remove those macros
. add timestamp to system_info as requested by philip

This was SVN commit r5050.
2007-05-09 21:01:11 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
be3f3bdbfb # SwEng / MacOSX compat
further cleanup to sysdep.h: avoid pulling in win and ia32; split header
up into stl, compiler, and the actual sys_* API. (all but the latter are
in PCH).

timer: also avoid dragging in ia32
win: move snprintf fix to posix.h
cpu: simplify reasoning about cores, now given as logicalPerCore (not
package)
vfs_optimizer: fix if archive building is partially disabled

This was SVN commit r5008.
2007-04-30 14:35:19 +00:00
c2b119e721 # Linux fixes.
Disabled CONFIG_USE_MMGR by default, since it seems unnecessary and it
makes debug builds slow (extremely slow under Valgrind) due to symbol
lookups when allocating memory.
Fixed minor warnings and errors.

This was SVN commit r4927.
2007-02-25 21:11:57 +00:00
27b6ffe2d6 # housekeeping
sorry, update-workspaces + rebuild is necessary (moved boost/utility
into PCH)

- ps/ : committed additional documentation on behalf of Joe.
- lib/ : HAVE_C99 - replace with specific e.g. HAVE_NPRINTF; intended to
help with MacOSX compat (by no longer requiring us to lie about
STDC_VERSION)
- NO_COPY_CTOR -> boost::noncopyable

This was SVN commit r4825.
2007-02-01 01:34:17 +00:00
871cdb6ef9 # SwEng (reduce full recompiles by splitting up master error header)
- error codes now accessed as ERR::NO_MEM, INFO::OK etc.
- no more X-macros => the above are now recognized by visual assist
- error codes are defined by the module originating them (lib_errors has
some generic ones)
  => no full rebuild when adding some
- error descriptions are now in C++ files => can be changed without full
rebuild

added AT_STARTUP in lib.h.

This was SVN commit r4374.
2006-09-22 13:19:40 +00:00