aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2019-04-04 21:11:39 +0200
committerGitHub <noreply@github.com>2019-04-04 21:11:39 +0200
commit587561f18cae15afc0509ec0c628fb6b1b071ef5 (patch)
tree618e98609c034cff6dd92040904c6f9866cf6757
parent9b00eee8fb29127e10ef174c74234f4d8747d9c0 (diff)
parent4ce46807a9ee8bb66b79b8d65ef8ccdb9e00de62 (diff)
Merge pull request #15861 from Rechi/cleanup/ifdef
[cleanup] remove ifdefs
-rw-r--r--xbmc/cores/AudioEngine/Sinks/osx/CoreAudioChannelLayout.h3
-rw-r--r--xbmc/cores/AudioEngine/Sinks/osx/CoreAudioDevice.h4
-rw-r--r--xbmc/cores/AudioEngine/Sinks/osx/CoreAudioHardware.h4
-rw-r--r--xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.h4
-rw-r--r--xbmc/cores/AudioEngine/Sinks/test/TestAESinkDARWINOSX.cpp2
-rw-r--r--xbmc/cores/DllLoader/LibraryLoader.h5
-rw-r--r--xbmc/cores/DllLoader/SoLoader.h5
-rw-r--r--xbmc/cores/VideoPlayer/Process/rbpi/ProcessInfoPi.cpp5
-rw-r--r--xbmc/filesystem/ZipManager.cpp2
-rw-r--r--xbmc/guilib/IMsgTargetCallback.h5
-rw-r--r--xbmc/network/GUIDialogAccessPoints.h5
-rw-r--r--xbmc/platform/android/filesystem/AndroidAppDirectory.cpp3
-rw-r--r--xbmc/platform/android/filesystem/AndroidAppDirectory.h3
-rw-r--r--xbmc/platform/android/filesystem/AndroidAppFile.cpp4
-rw-r--r--xbmc/platform/android/filesystem/AndroidAppFile.h4
-rw-r--r--xbmc/platform/android/powermanagement/AndroidPowerSyscall.cpp4
-rw-r--r--xbmc/platform/android/powermanagement/AndroidPowerSyscall.h2
-rw-r--r--xbmc/platform/darwin/AutoPool.mm2
-rw-r--r--xbmc/platform/darwin/DarwinUtils.mm3
-rw-r--r--xbmc/platform/darwin/osx/CocoaInterface.mm3
-rw-r--r--xbmc/platform/darwin/osx/SDLMain.h3
-rw-r--r--xbmc/platform/darwin/osx/SDLMain.mm3
-rw-r--r--xbmc/platform/darwin/osx/XBMCHelper.cpp2
-rw-r--r--xbmc/platform/darwin/osx/XBMCHelper.h5
-rw-r--r--xbmc/platform/linux/ConvUtils.cpp4
-rw-r--r--xbmc/platform/linux/PlatformDefs.h8
-rw-r--r--xbmc/platform/linux/XFileUtils.cpp2
-rw-r--r--xbmc/platform/linux/XHandle.h5
-rw-r--r--xbmc/platform/linux/XMemUtils.cpp5
-rw-r--r--xbmc/platform/linux/XTimeUtils.cpp4
-rw-r--r--xbmc/platform/posix/filesystem/PosixDirectory.cpp3
-rw-r--r--xbmc/platform/posix/filesystem/PosixFile.cpp4
-rw-r--r--xbmc/platform/posix/filesystem/SMBDirectory.cpp2
-rw-r--r--xbmc/platform/posix/filesystem/SMBFile.cpp2
-rw-r--r--xbmc/platform/posix/filesystem/SMBFile.h2
-rw-r--r--xbmc/platform/win10/AsyncHelpers.h4
-rw-r--r--xbmc/platform/win32/CharsetConverter.cpp2
-rw-r--r--xbmc/platform/win32/CharsetConverter.h2
-rw-r--r--xbmc/platform/win32/PlatformDefs.h5
-rw-r--r--xbmc/platform/win32/filesystem/Win32Directory.cpp2
-rw-r--r--xbmc/platform/win32/filesystem/Win32File.cpp3
-rw-r--r--xbmc/platform/win32/filesystem/Win32SMBFile.cpp4
-rw-r--r--xbmc/windowing/osx/WinSystemOSXGL.h4
-rw-r--r--xbmc/windowing/windows/WinEventsWin32.cpp4
44 files changed, 2 insertions, 154 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioChannelLayout.h b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioChannelLayout.h
index 0de837ca9d..22d11b3614 100644
--- a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioChannelLayout.h
+++ b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioChannelLayout.h
@@ -8,7 +8,6 @@
#pragma once
-#if defined(TARGET_DARWIN_OSX)
#include <list>
#include <vector>
#include <string>
@@ -74,5 +73,3 @@ public:
protected:
AudioChannelLayout* m_pLayout;
};
-
-#endif
diff --git a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioDevice.h b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioDevice.h
index bdaacdca89..d506460ca4 100644
--- a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioDevice.h
+++ b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioDevice.h
@@ -8,8 +8,6 @@
#pragma once
-#if defined(TARGET_DARWIN_OSX)
-
#include <list>
#include <string>
#include <vector>
@@ -93,5 +91,3 @@ protected:
void* inClientData);
};
-
-#endif
diff --git a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioHardware.h b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioHardware.h
index 1e823efc99..9c6cd4503a 100644
--- a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioHardware.h
+++ b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioHardware.h
@@ -8,8 +8,6 @@
#pragma once
-#if defined(TARGET_DARWIN_OSX)
-
#include "cores/AudioEngine/Sinks/osx/CoreAudioDevice.h"
// There is only one AudioSystemObject instance system-side.
@@ -28,5 +26,3 @@ public:
static void GetOutputDeviceName(std::string &name);
static UInt32 GetOutputDevices(CoreAudioDeviceList *pList);
};
-
-#endif
diff --git a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.h b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.h
index 87eb24df1e..572c93862d 100644
--- a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.h
+++ b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.h
@@ -8,8 +8,6 @@
#pragma once
-#if defined(TARGET_DARWIN_OSX)
-
#include "threads/Event.h"
#include <CoreAudio/CoreAudio.h>
#include <IOKit/audio/IOAudioTypes.h>
@@ -56,5 +54,3 @@ protected:
AudioStreamBasicDescription m_OriginalVirtualFormat;
AudioStreamBasicDescription m_OriginalPhysicalFormat;
};
-
-#endif
diff --git a/xbmc/cores/AudioEngine/Sinks/test/TestAESinkDARWINOSX.cpp b/xbmc/cores/AudioEngine/Sinks/test/TestAESinkDARWINOSX.cpp
index aab50a5282..8a2dd1901f 100644
--- a/xbmc/cores/AudioEngine/Sinks/test/TestAESinkDARWINOSX.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/test/TestAESinkDARWINOSX.cpp
@@ -8,7 +8,6 @@
#include "gtest/gtest.h"
-#if defined(TARGET_DARWIN_OSX)
#include "cores/AudioEngine/Sinks/osx/CoreAudioHardware.h"
#include "cores/AudioEngine/Sinks/osx/CoreAudioHelpers.h"
#include "cores/AudioEngine/Utils/AEUtil.h"
@@ -382,4 +381,3 @@ TEST(TestAESinkDARWINOSXScoreStream, MatchFloat5_1_96000InAllWithoutPassthroughF
formatIdx = findMatchingFormat(allFormatsWithoutPassthrough, srcFormat);
EXPECT_EQ(formatIdx, (unsigned int)15);
}
-#endif //TARGET_DARWIN_OSX
diff --git a/xbmc/cores/DllLoader/LibraryLoader.h b/xbmc/cores/DllLoader/LibraryLoader.h
index 88245dd0b6..a8db9861c2 100644
--- a/xbmc/cores/DllLoader/LibraryLoader.h
+++ b/xbmc/cores/DllLoader/LibraryLoader.h
@@ -8,9 +8,6 @@
#pragma once
-#ifndef LIBRARY_LOADER
-#define LIBRARY_LOADER
-
#include <string>
#ifdef TARGET_POSIX
@@ -47,5 +44,3 @@ private:
std::string m_path;
int m_iRefCount;
};
-
-#endif
diff --git a/xbmc/cores/DllLoader/SoLoader.h b/xbmc/cores/DllLoader/SoLoader.h
index e103891eb2..4adc7e9a39 100644
--- a/xbmc/cores/DllLoader/SoLoader.h
+++ b/xbmc/cores/DllLoader/SoLoader.h
@@ -1,6 +1,3 @@
-#ifndef SO_LOADER
-#define SO_LOADER
-
/*
* Copyright (C) 2005-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
@@ -36,5 +33,3 @@ private:
bool m_bGlobal;
bool m_bLoaded;
};
-
-#endif
diff --git a/xbmc/cores/VideoPlayer/Process/rbpi/ProcessInfoPi.cpp b/xbmc/cores/VideoPlayer/Process/rbpi/ProcessInfoPi.cpp
index d1df80f205..cdcfeffe1d 100644
--- a/xbmc/cores/VideoPlayer/Process/rbpi/ProcessInfoPi.cpp
+++ b/xbmc/cores/VideoPlayer/Process/rbpi/ProcessInfoPi.cpp
@@ -12,8 +12,6 @@
#include "cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.h"
// Override for platform ports
-#if defined(TARGET_RASPBERRY_PI)
-
using namespace MMAL;
CProcessInfo* CProcessInfoPi::Create()
@@ -44,6 +42,3 @@ bool CProcessInfoPi::AllowDTSHDDecode()
return false;
return true;
}
-
-#endif
-
diff --git a/xbmc/filesystem/ZipManager.cpp b/xbmc/filesystem/ZipManager.cpp
index 02912728fc..fede0d1089 100644
--- a/xbmc/filesystem/ZipManager.cpp
+++ b/xbmc/filesystem/ZipManager.cpp
@@ -13,7 +13,9 @@
#include "File.h"
#include "URL.h"
+#if defined(TARGET_POSIX)
#include "platform/linux/PlatformDefs.h"
+#endif
#include "utils/CharsetConverter.h"
#include "utils/EndianSwap.h"
#include "utils/log.h"
diff --git a/xbmc/guilib/IMsgTargetCallback.h b/xbmc/guilib/IMsgTargetCallback.h
index 6ebb26f70b..09d888e602 100644
--- a/xbmc/guilib/IMsgTargetCallback.h
+++ b/xbmc/guilib/IMsgTargetCallback.h
@@ -13,9 +13,6 @@
\brief
*/
-#ifndef GUILIB_IMSGTARGETCALLBACK
-#define GUILIB_IMSGTARGETCALLBACK
-
#include "GUIMessage.h"
/*!
@@ -28,5 +25,3 @@ public:
virtual bool OnMessage(CGUIMessage& message) = 0;
virtual ~IMsgTargetCallback() = default;
};
-
-#endif
diff --git a/xbmc/network/GUIDialogAccessPoints.h b/xbmc/network/GUIDialogAccessPoints.h
index 4db3104235..dcc0522f5b 100644
--- a/xbmc/network/GUIDialogAccessPoints.h
+++ b/xbmc/network/GUIDialogAccessPoints.h
@@ -1,6 +1,3 @@
-#ifndef GUI_DIALOG_ACCESS_POINTS
-#define GUI_DIALOG_ACCESS_POINTS
-
/*
* Copyright (C) 2005-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
@@ -37,5 +34,3 @@ private:
bool m_wasItemSelected;
CFileItemList *m_accessPoints;
};
-
-#endif
diff --git a/xbmc/platform/android/filesystem/AndroidAppDirectory.cpp b/xbmc/platform/android/filesystem/AndroidAppDirectory.cpp
index 6eff86616b..e6dcced983 100644
--- a/xbmc/platform/android/filesystem/AndroidAppDirectory.cpp
+++ b/xbmc/platform/android/filesystem/AndroidAppDirectory.cpp
@@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined(TARGET_ANDROID)
#include "AndroidAppDirectory.h"
#include "platform/android/activity/XBMCApp.h"
#include "FileItem.h"
@@ -64,5 +63,3 @@ bool CAndroidAppDirectory::GetDirectory(const CURL& url, CFileItemList &items)
CLog::Log(LOGERROR, "CAndroidAppDirectory::GetDirectory Failed to open %s", url.Get().c_str());
return false;
}
-
-#endif
diff --git a/xbmc/platform/android/filesystem/AndroidAppDirectory.h b/xbmc/platform/android/filesystem/AndroidAppDirectory.h
index 1b0d0b99ed..a8568dab23 100644
--- a/xbmc/platform/android/filesystem/AndroidAppDirectory.h
+++ b/xbmc/platform/android/filesystem/AndroidAppDirectory.h
@@ -8,7 +8,6 @@
#pragma once
-#if defined(TARGET_ANDROID)
#include "filesystem/IDirectory.h"
#include "FileItem.h"
namespace XFILE
@@ -26,5 +25,3 @@ public:
virtual DIR_CACHE_TYPE GetCacheType(const CURL& url) const override { return DIR_CACHE_NEVER; }
};
}
-#endif
-
diff --git a/xbmc/platform/android/filesystem/AndroidAppFile.cpp b/xbmc/platform/android/filesystem/AndroidAppFile.cpp
index 2fe13ffa4a..f60456468b 100644
--- a/xbmc/platform/android/filesystem/AndroidAppFile.cpp
+++ b/xbmc/platform/android/filesystem/AndroidAppFile.cpp
@@ -6,8 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined(TARGET_ANDROID)
-
#include <jni.h>
#include <sys/stat.h>
@@ -167,5 +165,3 @@ int CFileAndroidApp::IoControl(EIoControl request, void* param)
return 0;
return 1;
}
-#endif
-
diff --git a/xbmc/platform/android/filesystem/AndroidAppFile.h b/xbmc/platform/android/filesystem/AndroidAppFile.h
index acd39a9572..9d02dcc407 100644
--- a/xbmc/platform/android/filesystem/AndroidAppFile.h
+++ b/xbmc/platform/android/filesystem/AndroidAppFile.h
@@ -8,7 +8,6 @@
#pragma once
-#if defined(TARGET_ANDROID)
#include "filesystem/IFile.h"
#include "URL.h"
#include "string.h"
@@ -48,6 +47,3 @@ private:
int m_iconHeight;
};
}
-
-#endif
-
diff --git a/xbmc/platform/android/powermanagement/AndroidPowerSyscall.cpp b/xbmc/platform/android/powermanagement/AndroidPowerSyscall.cpp
index 8c51b24856..c31f442148 100644
--- a/xbmc/platform/android/powermanagement/AndroidPowerSyscall.cpp
+++ b/xbmc/platform/android/powermanagement/AndroidPowerSyscall.cpp
@@ -6,8 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined (TARGET_ANDROID)
-
#include "AndroidPowerSyscall.h"
#include "platform/android/activity/XBMCApp.h"
@@ -36,5 +34,3 @@ bool CAndroidPowerSyscall::PumpPowerEvents(IPowerEventsCallback *callback)
{
return true;
}
-
-#endif
diff --git a/xbmc/platform/android/powermanagement/AndroidPowerSyscall.h b/xbmc/platform/android/powermanagement/AndroidPowerSyscall.h
index fa80ae8ce9..d0e3e7d57a 100644
--- a/xbmc/platform/android/powermanagement/AndroidPowerSyscall.h
+++ b/xbmc/platform/android/powermanagement/AndroidPowerSyscall.h
@@ -8,7 +8,6 @@
#pragma once
-#if defined (TARGET_ANDROID)
#include "powermanagement/IPowerSyscall.h"
class CAndroidPowerSyscall : public CPowerSyscallWithoutEvents
@@ -33,4 +32,3 @@ public:
virtual bool PumpPowerEvents(IPowerEventsCallback *callback);
};
-#endif
diff --git a/xbmc/platform/darwin/AutoPool.mm b/xbmc/platform/darwin/AutoPool.mm
index 8d722c825c..268a3cb7fb 100644
--- a/xbmc/platform/darwin/AutoPool.mm
+++ b/xbmc/platform/darwin/AutoPool.mm
@@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined(TARGET_DARWIN)
#if defined(TARGET_DARWIN_IOS)
#import <Foundation/Foundation.h>
#else
@@ -38,4 +37,3 @@ void Cocoa_Destroy_AutoReleasePool(void* aPool)
NSAutoreleasePool* pool = (NSAutoreleasePool* )aPool;
[pool release];
}
-#endif
diff --git a/xbmc/platform/darwin/DarwinUtils.mm b/xbmc/platform/darwin/DarwinUtils.mm
index 854f7267d2..658a6d4fa4 100644
--- a/xbmc/platform/darwin/DarwinUtils.mm
+++ b/xbmc/platform/darwin/DarwinUtils.mm
@@ -13,7 +13,6 @@
#include "utils/URIUtils.h"
#include "CompileInfo.h"
-#if defined(TARGET_DARWIN)
#if defined(TARGET_DARWIN_IOS)
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@@ -705,5 +704,3 @@ bool CDarwinUtils::CreateAliasShortcut(const std::string& fromPath, const std::s
#endif
return ret;
}
-
-#endif
diff --git a/xbmc/platform/darwin/osx/CocoaInterface.mm b/xbmc/platform/darwin/osx/CocoaInterface.mm
index 668630c716..f4f2fe201a 100644
--- a/xbmc/platform/darwin/osx/CocoaInterface.mm
+++ b/xbmc/platform/darwin/osx/CocoaInterface.mm
@@ -5,7 +5,6 @@
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
-#if !defined(__arm__) && !defined(__aarch64__)
#import <unistd.h>
#import <sys/mount.h>
@@ -256,5 +255,3 @@ const char *Cocoa_Paste()
return NULL;
}
-
-#endif
diff --git a/xbmc/platform/darwin/osx/SDLMain.h b/xbmc/platform/darwin/osx/SDLMain.h
index e05eeaf240..71fea04632 100644
--- a/xbmc/platform/darwin/osx/SDLMain.h
+++ b/xbmc/platform/darwin/osx/SDLMain.h
@@ -7,10 +7,7 @@
* See LICENSES/README.md for more information.
*/
-#if !defined(__arm__) && !defined(__aarch64__)
-
#import <Cocoa/Cocoa.h>
@interface XBMCDelegate : NSObject<NSApplicationDelegate>
@end
-#endif
diff --git a/xbmc/platform/darwin/osx/SDLMain.mm b/xbmc/platform/darwin/osx/SDLMain.mm
index 138218f919..6b15cc788a 100644
--- a/xbmc/platform/darwin/osx/SDLMain.mm
+++ b/xbmc/platform/darwin/osx/SDLMain.mm
@@ -7,8 +7,6 @@
* See LICENSES/README.md for more information.
*/
-#if !defined(__arm__) && !defined(__aarch64__)
-
#import "SDL/SDL.h"
#import "SDLMain.h"
#import <sys/param.h> /* for MAXPATHLEN */
@@ -569,4 +567,3 @@ int main(int argc, char *argv[])
return status;
}
-#endif
diff --git a/xbmc/platform/darwin/osx/XBMCHelper.cpp b/xbmc/platform/darwin/osx/XBMCHelper.cpp
index 5690e71aa5..eb701df61e 100644
--- a/xbmc/platform/darwin/osx/XBMCHelper.cpp
+++ b/xbmc/platform/darwin/osx/XBMCHelper.cpp
@@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__)
#include <fstream>
#include <signal.h>
#include <sstream>
@@ -515,4 +514,3 @@ static int GetBSDProcessList(kinfo_proc **procList, size_t *procCount)
assert( (err == 0) == (*procList != NULL) );
return err;
}
-#endif
diff --git a/xbmc/platform/darwin/osx/XBMCHelper.h b/xbmc/platform/darwin/osx/XBMCHelper.h
index 8454105cc0..e511ac1152 100644
--- a/xbmc/platform/darwin/osx/XBMCHelper.h
+++ b/xbmc/platform/darwin/osx/XBMCHelper.h
@@ -8,8 +8,6 @@
#pragma once
-#if !defined(__arm__) && !defined(__aarch64__)
-
#include "settings/lib/ISettingCallback.h"
enum AppleRemoteOptions
@@ -70,6 +68,3 @@ private:
static XBMCHelper* smp_instance;
};
-
-#endif
-
diff --git a/xbmc/platform/linux/ConvUtils.cpp b/xbmc/platform/linux/ConvUtils.cpp
index 6b5986a6da..17d9bca9fa 100644
--- a/xbmc/platform/linux/ConvUtils.cpp
+++ b/xbmc/platform/linux/ConvUtils.cpp
@@ -8,8 +8,6 @@
#include "PlatformDefs.h"
-#ifdef TARGET_POSIX
-
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
@@ -23,5 +21,3 @@ void SetLastError(DWORD dwErrCode)
{
errno = dwErrCode;
}
-
-#endif
diff --git a/xbmc/platform/linux/PlatformDefs.h b/xbmc/platform/linux/PlatformDefs.h
index 337bbb9843..6a47b3ada6 100644
--- a/xbmc/platform/linux/PlatformDefs.h
+++ b/xbmc/platform/linux/PlatformDefs.h
@@ -8,8 +8,6 @@
#pragma once
-#ifdef TARGET_POSIX
-
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
@@ -46,7 +44,6 @@
#include <sys/time.h>
#include <time.h>
-#endif
#if defined(__ppc__) || defined(__powerpc__)
#define PIXEL_ASHIFT 0
@@ -90,8 +87,6 @@
#define PRIdS "zd"
#endif
-#ifdef TARGET_POSIX
-
#define _fdopen fdopen
#define _vsnprintf vsnprintf
#define _stricmp strcasecmp
@@ -273,6 +268,3 @@ typedef struct _MEMORYSTATUSEX
#define FILE_READ_DATA ( 0x0001 )
#define FILE_WRITE_DATA ( 0x0002 )
-
-#endif
-
diff --git a/xbmc/platform/linux/XFileUtils.cpp b/xbmc/platform/linux/XFileUtils.cpp
index 2002c4c468..ce359e85c4 100644
--- a/xbmc/platform/linux/XFileUtils.cpp
+++ b/xbmc/platform/linux/XFileUtils.cpp
@@ -11,7 +11,6 @@
#include "filesystem/SpecialProtocol.h"
#include "utils/StringUtils.h"
-#ifdef TARGET_POSIX
#include "XHandle.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -171,4 +170,3 @@ int _stat64( const char *path, struct __stat64 *buffer )
return stat64(path, buffer);
}
-#endif
diff --git a/xbmc/platform/linux/XHandle.h b/xbmc/platform/linux/XHandle.h
index 94c71d230b..6c9799ea9e 100644
--- a/xbmc/platform/linux/XHandle.h
+++ b/xbmc/platform/linux/XHandle.h
@@ -8,8 +8,6 @@
#pragma once
-#ifndef TARGET_WINDOWS
-
#include <list>
#include <string>
#include <vector>
@@ -58,6 +56,3 @@ protected:
static int m_objectTracker[10];
};
-
-#endif
-
diff --git a/xbmc/platform/linux/XMemUtils.cpp b/xbmc/platform/linux/XMemUtils.cpp
index a2ef1b387b..12b7693047 100644
--- a/xbmc/platform/linux/XMemUtils.cpp
+++ b/xbmc/platform/linux/XMemUtils.cpp
@@ -41,8 +41,6 @@ void _aligned_free(void *p) {
free(pFull);
}
-#ifndef TARGET_WINDOWS
-
#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD)
static FILE* procMeminfoFP = NULL;
#endif
@@ -176,6 +174,3 @@ void GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer)
lpBuffer->ullTotalVirtual = (info.totalram * info.mem_unit);
#endif
}
-
-#endif
-
diff --git a/xbmc/platform/linux/XTimeUtils.cpp b/xbmc/platform/linux/XTimeUtils.cpp
index 06c868ec2d..250c6c14d3 100644
--- a/xbmc/platform/linux/XTimeUtils.cpp
+++ b/xbmc/platform/linux/XTimeUtils.cpp
@@ -31,8 +31,6 @@
*/
#define IsLeapYear(y) ((!(y % 4)) ? (((!(y % 400)) && (y % 100)) ? 1 : 0) : 0)
-#ifdef TARGET_POSIX
-
void WINAPI Sleep(uint32_t dwMilliSeconds)
{
#if _POSIX_PRIORITY_SCHEDULING
@@ -219,5 +217,3 @@ int TimeTToFileTime(time_t timeT, FILETIME* lpLocalFileTime) {
return 1;
}
-
-#endif
diff --git a/xbmc/platform/posix/filesystem/PosixDirectory.cpp b/xbmc/platform/posix/filesystem/PosixDirectory.cpp
index d93c6fd397..d5a7845b53 100644
--- a/xbmc/platform/posix/filesystem/PosixDirectory.cpp
+++ b/xbmc/platform/posix/filesystem/PosixDirectory.cpp
@@ -6,8 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined(TARGET_POSIX)
-
#include "PosixDirectory.h"
#include "utils/AliasShortcutUtils.h"
#include "utils/CharsetConverter.h"
@@ -206,4 +204,3 @@ bool CPosixDirectory::Exists(const CURL& url)
return false;
return S_ISDIR(buffer.st_mode) ? true : false;
}
-#endif
diff --git a/xbmc/platform/posix/filesystem/PosixFile.cpp b/xbmc/platform/posix/filesystem/PosixFile.cpp
index 89dc1816c3..340f4f17f6 100644
--- a/xbmc/platform/posix/filesystem/PosixFile.cpp
+++ b/xbmc/platform/posix/filesystem/PosixFile.cpp
@@ -6,8 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined(TARGET_POSIX)
-
#include "PosixFile.h"
#include "utils/AliasShortcutUtils.h"
#include "URL.h"
@@ -341,5 +339,3 @@ int CPosixFile::Stat(struct __stat64* buffer)
return fstat64(m_fd, buffer);
}
-
-#endif // TARGET_POSIX
diff --git a/xbmc/platform/posix/filesystem/SMBDirectory.cpp b/xbmc/platform/posix/filesystem/SMBDirectory.cpp
index 0ced4d2fca..35eace33ef 100644
--- a/xbmc/platform/posix/filesystem/SMBDirectory.cpp
+++ b/xbmc/platform/posix/filesystem/SMBDirectory.cpp
@@ -29,9 +29,7 @@
#include "utils/URIUtils.h"
#include "threads/SingleLock.h"
#include "PasswordManager.h"
-#ifdef TARGET_POSIX
#include "platform/linux/XTimeUtils.h"
-#endif
#include <libsmbclient.h>
diff --git a/xbmc/platform/posix/filesystem/SMBFile.cpp b/xbmc/platform/posix/filesystem/SMBFile.cpp
index 3f84a17f5e..71e6ec5a6c 100644
--- a/xbmc/platform/posix/filesystem/SMBFile.cpp
+++ b/xbmc/platform/posix/filesystem/SMBFile.cpp
@@ -54,10 +54,8 @@ bool CSMB::IsFirstInit = true;
CSMB::CSMB()
{
m_context = NULL;
-#ifdef TARGET_POSIX
m_OpenConnections = 0;
m_IdleTimeout = 0;
-#endif
}
CSMB::~CSMB()
diff --git a/xbmc/platform/posix/filesystem/SMBFile.h b/xbmc/platform/posix/filesystem/SMBFile.h
index 8947722a9f..5ad942d28d 100644
--- a/xbmc/platform/posix/filesystem/SMBFile.h
+++ b/xbmc/platform/posix/filesystem/SMBFile.h
@@ -45,11 +45,9 @@ public:
DWORD ConvertUnixToNT(int error);
private:
SMBCCTX *m_context;
-#ifdef TARGET_POSIX
int m_OpenConnections;
unsigned int m_IdleTimeout;
static bool IsFirstInit;
-#endif
};
extern CSMB smb;
diff --git a/xbmc/platform/win10/AsyncHelpers.h b/xbmc/platform/win10/AsyncHelpers.h
index dd1c27c9df..aaca173aae 100644
--- a/xbmc/platform/win10/AsyncHelpers.h
+++ b/xbmc/platform/win10/AsyncHelpers.h
@@ -8,8 +8,6 @@
#pragma once
-#ifdef TARGET_WINDOWS_STORE
-
#include <ppl.h>
#include <ppltasks.h>
@@ -88,5 +86,3 @@ TResult Wait(const Concurrency::task<TResult>& asyncOp)
return asyncOp.get();
}
-
-#endif
diff --git a/xbmc/platform/win32/CharsetConverter.cpp b/xbmc/platform/win32/CharsetConverter.cpp
index ed4025cac7..cebbf3bf7d 100644
--- a/xbmc/platform/win32/CharsetConverter.cpp
+++ b/xbmc/platform/win32/CharsetConverter.cpp
@@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#if defined(TARGET_WINDOWS)
#include <memory>
#include "CharsetConverter.h"
@@ -58,4 +57,3 @@ std::wstring ToW(const std::string& str)
}
}
}
-#endif
diff --git a/xbmc/platform/win32/CharsetConverter.h b/xbmc/platform/win32/CharsetConverter.h
index e5fa015452..d442354559 100644
--- a/xbmc/platform/win32/CharsetConverter.h
+++ b/xbmc/platform/win32/CharsetConverter.h
@@ -10,7 +10,6 @@
#include <string>
-#if defined(TARGET_WINDOWS)
namespace KODI
{
namespace PLATFORM
@@ -61,4 +60,3 @@ std::wstring ToW(const std::string& str);
}
}
}
-#endif
diff --git a/xbmc/platform/win32/PlatformDefs.h b/xbmc/platform/win32/PlatformDefs.h
index 68689ed2c2..ff3aea2a59 100644
--- a/xbmc/platform/win32/PlatformDefs.h
+++ b/xbmc/platform/win32/PlatformDefs.h
@@ -8,8 +8,6 @@
#pragma once
-#ifdef TARGET_WINDOWS
-
#include <windows.h>
#define __STDC_FORMAT_MACROS
@@ -57,6 +55,3 @@ typedef intptr_t ssize_t;
#endif
extern "C" char * strptime(const char *buf, const char *fmt, struct tm *tm);
-
-#endif // TARGET_WINDOWS
-
diff --git a/xbmc/platform/win32/filesystem/Win32Directory.cpp b/xbmc/platform/win32/filesystem/Win32Directory.cpp
index 98c6049443..45cb1b78fb 100644
--- a/xbmc/platform/win32/filesystem/Win32Directory.cpp
+++ b/xbmc/platform/win32/filesystem/Win32Directory.cpp
@@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#ifdef TARGET_WINDOWS
#include "Win32Directory.h"
#include "FileItem.h"
#include "platform/win32/WIN32Util.h"
@@ -244,4 +243,3 @@ bool CWin32Directory::Create(std::wstring path) const
return true;
}
-#endif // TARGET_WINDOWS
diff --git a/xbmc/platform/win32/filesystem/Win32File.cpp b/xbmc/platform/win32/filesystem/Win32File.cpp
index 71ce719d9e..e95ef5cc6d 100644
--- a/xbmc/platform/win32/filesystem/Win32File.cpp
+++ b/xbmc/platform/win32/filesystem/Win32File.cpp
@@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#ifdef TARGET_WINDOWS
#include "Win32File.h"
#include "platform/win32/WIN32Util.h"
#include "platform/win32/CharsetConverter.h"
@@ -758,5 +757,3 @@ int CWin32File::Stat(struct __stat64* statData)
return 0;
}
-
-#endif // TARGET_WINDOWS
diff --git a/xbmc/platform/win32/filesystem/Win32SMBFile.cpp b/xbmc/platform/win32/filesystem/Win32SMBFile.cpp
index 0310958a98..e6ec15d8fa 100644
--- a/xbmc/platform/win32/filesystem/Win32SMBFile.cpp
+++ b/xbmc/platform/win32/filesystem/Win32SMBFile.cpp
@@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/
-#ifdef TARGET_WINDOWS
#include "Win32SMBFile.h"
#include "Win32SMBDirectory.h"
#include "URL.h"
@@ -142,6 +141,3 @@ int CWin32SMBFile::Stat(const CURL& url, struct __stat64* statData)
return CWin32File::Stat(url, statData);
}
-
-
-#endif // TARGET_WINDOWS
diff --git a/xbmc/windowing/osx/WinSystemOSXGL.h b/xbmc/windowing/osx/WinSystemOSXGL.h
index 87f170200b..4de88c82a0 100644
--- a/xbmc/windowing/osx/WinSystemOSXGL.h
+++ b/xbmc/windowing/osx/WinSystemOSXGL.h
@@ -8,7 +8,6 @@
#pragma once
-#if !defined(__arm__) && !defined(__aarch64__)
#include "WinSystemOSX.h"
#include "rendering/gl/RenderSystemGL.h"
@@ -27,6 +26,3 @@ protected:
virtual void PresentRenderImpl(bool rendered) override;
virtual void SetVSyncImpl(bool enable) override;
};
-
-#endif
-
diff --git a/xbmc/windowing/windows/WinEventsWin32.cpp b/xbmc/windowing/windows/WinEventsWin32.cpp
index 6d0f7a786e..11c088314b 100644
--- a/xbmc/windowing/windows/WinEventsWin32.cpp
+++ b/xbmc/windowing/windows/WinEventsWin32.cpp
@@ -41,8 +41,6 @@
#include "WinKeyMap.h"
#include "WinEventsWin32.h"
-#ifdef TARGET_WINDOWS
-
using namespace KODI::MESSAGING;
HWND g_hWnd = nullptr;
@@ -993,5 +991,3 @@ void CWinEventsWin32::OnGesture(HWND hWnd, LPARAM lParam)
if(DX::Windowing()->PtrCloseGestureInfoHandle)
DX::Windowing()->PtrCloseGestureInfoHandle(reinterpret_cast<HGESTUREINFO>(lParam));
}
-
-#endif