forked from 0ad/0ad
Remove checks for unsupported GCC versions (<4.6).
This was SVN commit r16224.
This commit is contained in:
parent
59503b9ae9
commit
fc902df07c
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -24,12 +24,10 @@
|
||||
# else
|
||||
# define EXPORT extern "C" __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# if __GNUC__ >= 4
|
||||
#elif defined(__GNUC__)
|
||||
# define EXPORT extern "C" __attribute__ ((visibility ("default")))
|
||||
# else
|
||||
#else
|
||||
# define EXPORT extern "C"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define LOG_INFO 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2013 Wildfire Games
|
||||
/* Copyright (c) 2015 Wildfire Games
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@ -70,7 +70,7 @@
|
||||
* NOTHROW_DECLARE void function();
|
||||
* NOTHROW_DEFINE void function() {}
|
||||
**/
|
||||
#if GCC_VERSION >= 303
|
||||
#if GCC_VERSION
|
||||
# define NOTHROW_DECLARE __attribute__((nothrow))
|
||||
# define NOTHROW_DEFINE // not supported for definitions
|
||||
#elif MSC_VERSION
|
||||
@ -121,7 +121,7 @@
|
||||
#define HAVE_ASSUME_UNREACHABLE 1
|
||||
#if MSC_VERSION && !ICC_VERSION // (ICC ignores this)
|
||||
# define ASSUME_UNREACHABLE __assume(0)
|
||||
#elif GCC_VERSION >= 450
|
||||
#elif GCC_VERSION
|
||||
# define ASSUME_UNREACHABLE __builtin_unreachable()
|
||||
#else
|
||||
# define ASSUME_UNREACHABLE
|
||||
@ -327,10 +327,10 @@ template<typename T, size_t n> char (*ArraySizeDeducer(T (&)[n]))[n];
|
||||
|
||||
// C99-style __func__
|
||||
// .. newer GCC already have it
|
||||
#if GCC_VERSION >= 300
|
||||
#if GCC_VERSION
|
||||
// nothing need be done
|
||||
// .. old GCC and MSVC have __FUNCTION__
|
||||
#elif GCC_VERSION >= 200 || MSC_VERSION
|
||||
// .. MSVC have __FUNCTION__
|
||||
#elif MSC_VERSION
|
||||
# define __func__ __FUNCTION__
|
||||
// .. unsupported
|
||||
#else
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2014 Wildfire Games
|
||||
/* Copyright (c) 2015 Wildfire Games
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@ -35,12 +35,8 @@
|
||||
#include <mach-o/dyld.h> // _NSGetExecutablePath
|
||||
|
||||
// Ignore deprecation warnings for 10.5 backwards compatibility
|
||||
#if GCC_VERSION >= 402 // (older GCCs don't support this pragma)
|
||||
# if GCC_VERSION >= 406 // store user flags
|
||||
# pragma GCC diagnostic push
|
||||
# endif
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
Status sys_clipboard_set(const wchar_t* text)
|
||||
{
|
||||
@ -187,9 +183,4 @@ OsPath sys_ExecutablePathname()
|
||||
return path;
|
||||
}
|
||||
|
||||
#if GCC_VERSION >= 402
|
||||
# pragma GCC diagnostic warning "-Wdeprecated-declarations"
|
||||
# if GCC_VERSION >= 406
|
||||
# pragma GCC diagnostic pop // restore user flags
|
||||
# endif
|
||||
#endif
|
||||
#pragma GCC diagnostic pop // restore user flags
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -52,10 +52,6 @@
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
#if GCC_VERSION
|
||||
# pragma GCC diagnostic warning "-Wunused-parameter"
|
||||
# pragma GCC diagnostic warning "-Wredundant-decls"
|
||||
# pragma GCC diagnostic warning "-Wnon-virtual-dtor"
|
||||
// restore user flags and re-enable the warnings disabled a few lines above
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
6
source/third_party/mikktspace/mikktspace.cpp
vendored
6
source/third_party/mikktspace/mikktspace.cpp
vendored
@ -10,12 +10,8 @@
|
||||
# pragma warning(disable:4189) // local variable is initialized but not referenced
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# define GCC_VERSION (__GNUC__*100 + __GNUC_MINOR__)
|
||||
|
||||
# if GCC_VERSION >= 402 // older GCCs don't support the diagnostic pragma at all
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/** \file mikktspace/mikktspace.c
|
||||
|
8
source/third_party/mongoose/mongoose.cpp
vendored
8
source/third_party/mongoose/mongoose.cpp
vendored
@ -22,15 +22,9 @@
|
||||
# pragma comment(lib, "ws2_32.lib")
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# define GCC_VERSION (__GNUC__*100 + __GNUC_MINOR__)
|
||||
|
||||
# if GCC_VERSION >= 402 // older GCCs don't support the diagnostic pragma at all
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wunused-function"
|
||||
# endif
|
||||
# if GCC_VERSION >= 406 // new warning in 4.6
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define NO_CGI
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -20,12 +20,7 @@
|
||||
#define JSON_SPIRIT_INCLUDE_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define GCC_VERSION (__GNUC__*100 + __GNUC_MINOR__)
|
||||
#else
|
||||
# define GCC_VERSION 0
|
||||
#endif
|
||||
|
||||
#if GCC_VERSION >= 402 // (older GCCs don't support this pragma)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
@ -42,8 +37,8 @@
|
||||
#pragma warning(default: 4512)
|
||||
#endif
|
||||
|
||||
#if GCC_VERSION >= 402
|
||||
# pragma GCC diagnostic warning "-Wunused-parameter"
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif // JSON_SPIRIT_INCLUDE_H
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -39,7 +39,8 @@
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__*100 + __GNUC_MINOR__) >= 402 // (older GCCs don't support this pragma)
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wredundant-decls" // triggered by wx/geometry.h
|
||||
#endif
|
||||
|
||||
@ -72,8 +73,8 @@
|
||||
#include "wx/wfstream.h"
|
||||
#include "wx/zstream.h"
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__*100 + __GNUC_MINOR__) >= 402
|
||||
# pragma GCC diagnostic warning "-Wredundant-decls" // re-enable
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
@ -109,12 +110,10 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
# define ATLASDLLIMPEXP extern "C" __declspec(dllexport)
|
||||
#else
|
||||
# if __GNUC__ >= 4
|
||||
#elif defined(__GNUC__)
|
||||
# define ATLASDLLIMPEXP extern "C" __attribute__ ((visibility ("default")))
|
||||
# else
|
||||
#else
|
||||
# define ATLASDLLIMPEXP extern "C"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Abort with an obvious message if wx isn't Unicode, instead of complaining
|
||||
|
Loading…
Reference in New Issue
Block a user