diff options
author | athenian200 <athenian200@outlook.com> | 2019-10-19 14:24:49 -0500 |
---|---|---|
committer | athenian200 <athenian200@outlook.com> | 2019-10-21 04:53:45 -0500 |
commit | 687a798e6dedacb8b42826debcd8e89baa69ce94 (patch) | |
tree | e2ce9b1a8dd6822071051f4052fbdaee2feb5976 | |
parent | e4f90cbb56b3cdcde52396b1aaa476cc8c5f07e5 (diff) | |
download | UXP-687a798e6dedacb8b42826debcd8e89baa69ce94.tar UXP-687a798e6dedacb8b42826debcd8e89baa69ce94.tar.gz UXP-687a798e6dedacb8b42826debcd8e89baa69ce94.tar.lz UXP-687a798e6dedacb8b42826debcd8e89baa69ce94.tar.xz UXP-687a798e6dedacb8b42826debcd8e89baa69ce94.zip |
MoonchildProductions#1251 - Part 27: Fix ifdef style.
This should do it for all the commits to files I changed, but while I'm in here I could probably go ahead and turn ALL the singular if defined statements into ifdef statements by using grep/find on the tree. On the other hand, perhaps we should do that as a separate issue so that this doesn't become a case of scope creep.
-rw-r--r-- | dom/base/nsContentUtils.h | 4 | ||||
-rw-r--r-- | dom/media/AudioStream.h | 2 | ||||
-rw-r--r-- | dom/plugins/base/nsPluginsDirUnix.cpp | 4 | ||||
-rw-r--r-- | ipc/chromium/src/base/message_pump_glib.cc | 6 | ||||
-rw-r--r-- | ipc/chromium/src/base/message_pump_libevent.cc | 2 | ||||
-rw-r--r-- | ipc/chromium/src/base/sys_info_posix.cc | 4 | ||||
-rw-r--r-- | ipc/chromium/src/base/time.h | 8 | ||||
-rw-r--r-- | ipc/chromium/src/base/time_posix.cc | 2 | ||||
-rw-r--r-- | ipc/glue/MessageLink.cpp | 4 | ||||
-rw-r--r-- | js/src/builtin/TestingFunctions.cpp | 2 | ||||
-rw-r--r-- | js/src/gc/Memory.cpp | 2 | ||||
-rw-r--r-- | modules/libjar/nsZipArchive.cpp | 2 | ||||
-rw-r--r-- | toolkit/components/terminator/nsTerminator.cpp | 4 | ||||
-rw-r--r-- | toolkit/xre/nsSigHandlers.cpp | 4 | ||||
-rw-r--r-- | xpcom/ds/nsMathUtils.h | 2 |
15 files changed, 26 insertions, 26 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 26635acd6..606d67de9 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -9,11 +9,11 @@ #ifndef nsContentUtils_h___ #define nsContentUtils_h___ -#if defined(XP_WIN) +#ifdef XP_WIN #include <float.h> #endif -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS #include <ieeefp.h> #endif diff --git a/dom/media/AudioStream.h b/dom/media/AudioStream.h index 13cbb0c75..199314d4b 100644 --- a/dom/media/AudioStream.h +++ b/dom/media/AudioStream.h @@ -17,7 +17,7 @@ #include "mozilla/UniquePtr.h" #include "CubebUtils.h" #include "soundtouch/SoundTouchFactory.h" -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS #include "soundtouch/SoundTouch.h" #endif diff --git a/dom/plugins/base/nsPluginsDirUnix.cpp b/dom/plugins/base/nsPluginsDirUnix.cpp index 22d6bd44b..de3b7a2d1 100644 --- a/dom/plugins/base/nsPluginsDirUnix.cpp +++ b/dom/plugins/base/nsPluginsDirUnix.cpp @@ -19,7 +19,7 @@ #include "nsIPrefService.h" #define LOCAL_PLUGIN_DLL_SUFFIX ".so" -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS #define DEFAULT_X11_PATH "/usr/openwin/lib" #elif defined(LINUX) #define DEFAULT_X11_PATH "/usr/X11R6/lib/" @@ -94,7 +94,7 @@ static bool LoadExtraSharedLib(const char *name, char **soname, bool tryToGetSon #define PLUGIN_MAX_NUMBER_OF_EXTRA_LIBS 32 #define PREF_PLUGINS_SONAME "plugin.soname.list" -#if defined (XP_SOLARIS) +#ifdef XP_SOLARIS #define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX ":libXm" LOCAL_PLUGIN_DLL_SUFFIX #else #define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX diff --git a/ipc/chromium/src/base/message_pump_glib.cc b/ipc/chromium/src/base/message_pump_glib.cc index f92378f3b..24081bd8b 100644 --- a/ipc/chromium/src/base/message_pump_glib.cc +++ b/ipc/chromium/src/base/message_pump_glib.cc @@ -9,7 +9,7 @@ #include <fcntl.h> #include <math.h> -#if defined(OS_SOLARIS) +#ifdef OS_SOLARIS #include <unistd.h> #endif #include <gtk/gtk.h> @@ -134,7 +134,7 @@ MessagePumpForUI::MessagePumpForUI() // Create our wakeup pipe, which is used to flag when work was scheduled. int fds[2]; CHECK(pipe(fds) == 0); -#if defined(OS_SOLARIS) +#ifdef OS_SOLARIS int flags = fcntl(fds[0], F_GETFL,0); if (flags == -1) flags = 0; @@ -324,7 +324,7 @@ void MessagePumpForUI::ScheduleWork() { // variables as we would then need locks all over. This ensures that if // we are sleeping in a poll that we will wake up. char msg = '!'; -#if defined(OS_SOLARIS) +#ifdef OS_SOLARIS char buf[32]; while (HANDLE_EINTR(read(wakeup_pipe_read_, &buf, 32))); #endif diff --git a/ipc/chromium/src/base/message_pump_libevent.cc b/ipc/chromium/src/base/message_pump_libevent.cc index 20d529707..51d3205b8 100644 --- a/ipc/chromium/src/base/message_pump_libevent.cc +++ b/ipc/chromium/src/base/message_pump_libevent.cc @@ -8,7 +8,7 @@ #include <errno.h> #include <fcntl.h> -#if defined(OS_SOLARIS) +#ifdef OS_SOLARIS #include <sys/stat.h> #endif #if defined(ANDROID) || defined(OS_POSIX) diff --git a/ipc/chromium/src/base/sys_info_posix.cc b/ipc/chromium/src/base/sys_info_posix.cc index 6adbb1c06..f29c85092 100644 --- a/ipc/chromium/src/base/sys_info_posix.cc +++ b/ipc/chromium/src/base/sys_info_posix.cc @@ -121,7 +121,7 @@ std::wstring SysInfo::GetEnvVar(const wchar_t* var) { // static std::string SysInfo::OperatingSystemName() { -#if !defined(XP_SOLARIS) +#ifndef XP_SOLARIS) utsname info; #else struct utsname info; @@ -139,7 +139,7 @@ std::string SysInfo::OperatingSystemName() { // static std::string SysInfo::CPUArchitecture() { -#if !defined(XP_SOLARIS) +#ifndef XP_SOLARIS utsname info; #else struct utsname info; diff --git a/ipc/chromium/src/base/time.h b/ipc/chromium/src/base/time.h index 6a5c92d14..cee463579 100644 --- a/ipc/chromium/src/base/time.h +++ b/ipc/chromium/src/base/time.h @@ -28,7 +28,7 @@ #include "base/basictypes.h" -#if defined(OS_WIN) +#ifdef OS_WIN // For FILETIME in FromFileTime, until it moves to a new converter class. // See TODO(iyengar) below. #include <windows.h> @@ -64,7 +64,7 @@ class TimeDelta { return delta_; } -#if defined(OS_SOLARIS) +#ifdef OS_SOLARIS struct timespec ToTimeSpec() const; #endif @@ -230,11 +230,11 @@ class Time { static Time FromDoubleT(double dt); double ToDoubleT() const; -#if defined(OS_SOLARIS) +#ifdef OS_SOLARIS struct timeval ToTimeVal() const; #endif -#if defined(OS_WIN) +#ifdef OS_WIN static Time FromFileTime(FILETIME ft); FILETIME ToFileTime() const; #endif diff --git a/ipc/chromium/src/base/time_posix.cc b/ipc/chromium/src/base/time_posix.cc index 419cc8afb..5e0a922d9 100644 --- a/ipc/chromium/src/base/time_posix.cc +++ b/ipc/chromium/src/base/time_posix.cc @@ -202,7 +202,7 @@ TimeTicks TimeTicks::HighResNow() { return Now(); } -#if defined(OS_SOLARIS) +#ifdef OS_SOLARIS struct timespec TimeDelta::ToTimeSpec() const { int64_t microseconds = InMicroseconds(); time_t seconds = 0; diff --git a/ipc/glue/MessageLink.cpp b/ipc/glue/MessageLink.cpp index 8c6d9b890..14d885544 100644 --- a/ipc/glue/MessageLink.cpp +++ b/ipc/glue/MessageLink.cpp @@ -278,7 +278,7 @@ ProcessLink::OnChannelOpened() #ifdef DEBUG if (mExistingListener) { -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS std::queue<Message> pending; #else queue<Message> pending; @@ -298,7 +298,7 @@ void ProcessLink::OnTakeConnectedChannel() { AssertIOThread(); -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS std::queue<Message> pending; #else queue<Message> pending; diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 6beb82932..4363c7aed 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -239,7 +239,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp) value = BooleanValue(true); if (!JS_SetProperty(cx, info, "intl-api", value)) return false; -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS value = BooleanValue(false); #else value = BooleanValue(true); diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp index 2bc1b9f50..418984057 100644 --- a/js/src/gc/Memory.cpp +++ b/js/src/gc/Memory.cpp @@ -685,7 +685,7 @@ MarkPagesUnused(void* p, size_t size) return false; MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0); -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS int result = posix_madvise(p, size, POSIX_MADV_DONTNEED); #else int result = madvise(p, size, MADV_DONTNEED); diff --git a/modules/libjar/nsZipArchive.cpp b/modules/libjar/nsZipArchive.cpp index 24da13072..841503ebf 100644 --- a/modules/libjar/nsZipArchive.cpp +++ b/modules/libjar/nsZipArchive.cpp @@ -688,7 +688,7 @@ MOZ_WIN_MEM_TRY_BEGIN // Success means optimized jar layout from bug 559961 is in effect uint32_t readaheadLength = xtolong(startp); if (readaheadLength) { -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS posix_madvise(const_cast<uint8_t*>(startp), readaheadLength, POSIX_MADV_WILLNEED); #elif defined(XP_UNIX) madvise(const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED); diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp index 007885b8d..9f6a90b57 100644 --- a/toolkit/components/terminator/nsTerminator.cpp +++ b/toolkit/components/terminator/nsTerminator.cpp @@ -30,7 +30,7 @@ #include "nsIObserverService.h" #include "nsIPrefService.h" -#if defined(XP_WIN) +#ifdef XP_WIN #include <windows.h> #else #include <unistd.h> @@ -385,7 +385,7 @@ nsTerminator::StartWatchdog() } UniquePtr<Options> options(new Options()); -#if !defined(XP_SOLARIS) +#ifdef XP_SOLARIS const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000); #else const PRIntervalTime ticksDuration = 1000; diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp index a3a366f95..660af4522 100644 --- a/toolkit/xre/nsSigHandlers.cpp +++ b/toolkit/xre/nsSigHandlers.cpp @@ -32,7 +32,7 @@ #endif #endif -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS #include <sys/resource.h> #include <ucontext.h> #endif @@ -286,7 +286,7 @@ void InstallSignalHandlers(const char *aProgname) } #endif -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS #define NOFILES 512 // Boost Solaris file descriptors diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h index 61eb47501..e3f423c8f 100644 --- a/xpcom/ds/nsMathUtils.h +++ b/xpcom/ds/nsMathUtils.h @@ -11,7 +11,7 @@ #include <cmath> #include <float.h> -#if defined(XP_SOLARIS) +#ifdef XP_SOLARIS #include <math.h> #include <ieeefp.h> #endif |