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.
This commit is contained in:
athenian200 2019-10-19 14:24:49 -05:00 • committed by Roy Tam
commit 45bf760ac5
15 changed files with 26 additions and 26 deletions

View file

@ -9,11 +9,11 @@
#ifndef nsContentUtils_h___ #ifndef nsContentUtils_h___
#define nsContentUtils_h___ #define nsContentUtils_h___
#if defined(XP_WIN) #ifdef XP_WIN
#include <float.h> #include <float.h>
#endif #endif
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
#include <ieeefp.h> #include <ieeefp.h>
#endif #endif

View file

@ -17,7 +17,7 @@
#include "mozilla/UniquePtr.h" #include "mozilla/UniquePtr.h"
#include "CubebUtils.h" #include "CubebUtils.h"
#include "soundtouch/SoundTouchFactory.h" #include "soundtouch/SoundTouchFactory.h"
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
#include "soundtouch/SoundTouch.h" #include "soundtouch/SoundTouch.h"
#endif #endif

View file

@ -19,7 +19,7 @@
#include "nsIPrefService.h" #include "nsIPrefService.h"
#define LOCAL_PLUGIN_DLL_SUFFIX ".so" #define LOCAL_PLUGIN_DLL_SUFFIX ".so"
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
#define DEFAULT_X11_PATH "/usr/openwin/lib" #define DEFAULT_X11_PATH "/usr/openwin/lib"
#elif defined(LINUX) #elif defined(LINUX)
#define DEFAULT_X11_PATH "/usr/X11R6/lib/" #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 PLUGIN_MAX_NUMBER_OF_EXTRA_LIBS 32
#define PREF_PLUGINS_SONAME "plugin.soname.list" #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 #define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX ":libXm" LOCAL_PLUGIN_DLL_SUFFIX
#else #else
#define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX #define DEFAULT_EXTRA_LIBS_LIST "libXt" LOCAL_PLUGIN_DLL_SUFFIX ":libXext" LOCAL_PLUGIN_DLL_SUFFIX

View file

@ -9,7 +9,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <math.h> #include <math.h>
#if defined(OS_SOLARIS) #ifdef OS_SOLARIS
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <gtk/gtk.h> #include <gtk/gtk.h>
@ -134,7 +134,7 @@ MessagePumpForUI::MessagePumpForUI()
// Create our wakeup pipe, which is used to flag when work was scheduled. // Create our wakeup pipe, which is used to flag when work was scheduled.
int fds[2]; int fds[2];
CHECK(pipe(fds) == 0); CHECK(pipe(fds) == 0);
#if defined(OS_SOLARIS) #ifdef OS_SOLARIS
int flags = fcntl(fds[0], F_GETFL,0); int flags = fcntl(fds[0], F_GETFL,0);
if (flags == -1) if (flags == -1)
flags = 0; flags = 0;
@ -324,7 +324,7 @@ void MessagePumpForUI::ScheduleWork() {
// variables as we would then need locks all over. This ensures that if // variables as we would then need locks all over. This ensures that if
// we are sleeping in a poll that we will wake up. // we are sleeping in a poll that we will wake up.
char msg = '!'; char msg = '!';
#if defined(OS_SOLARIS) #ifdef OS_SOLARIS
char buf[32]; char buf[32];
while (HANDLE_EINTR(read(wakeup_pipe_read_, &buf, 32))); while (HANDLE_EINTR(read(wakeup_pipe_read_, &buf, 32)));
#endif #endif

View file

@ -8,7 +8,7 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#if defined(OS_SOLARIS) #ifdef OS_SOLARIS
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#if defined(ANDROID) || defined(OS_POSIX) #if defined(ANDROID) || defined(OS_POSIX)

View file

@ -121,7 +121,7 @@ std::wstring SysInfo::GetEnvVar(const wchar_t* var) {
// static // static
std::string SysInfo::OperatingSystemName() { std::string SysInfo::OperatingSystemName() {
#if !defined(XP_SOLARIS) #ifndef XP_SOLARIS)
utsname info; utsname info;
#else #else
struct utsname info; struct utsname info;
@ -139,7 +139,7 @@ std::string SysInfo::OperatingSystemName() {
// static // static
std::string SysInfo::CPUArchitecture() { std::string SysInfo::CPUArchitecture() {
#if !defined(XP_SOLARIS) #ifndef XP_SOLARIS
utsname info; utsname info;
#else #else
struct utsname info; struct utsname info;

View file

@ -28,7 +28,7 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#if defined(OS_WIN) #ifdef OS_WIN
// For FILETIME in FromFileTime, until it moves to a new converter class. // For FILETIME in FromFileTime, until it moves to a new converter class.
// See TODO(iyengar) below. // See TODO(iyengar) below.
#include <windows.h> #include <windows.h>
@ -64,7 +64,7 @@ class TimeDelta {
return delta_; return delta_;
} }
#if defined(OS_SOLARIS) #ifdef OS_SOLARIS
struct timespec ToTimeSpec() const; struct timespec ToTimeSpec() const;
#endif #endif
@ -230,11 +230,11 @@ class Time {
static Time FromDoubleT(double dt); static Time FromDoubleT(double dt);
double ToDoubleT() const; double ToDoubleT() const;
#if defined(OS_SOLARIS) #ifdef OS_SOLARIS
struct timeval ToTimeVal() const; struct timeval ToTimeVal() const;
#endif #endif
#if defined(OS_WIN) #ifdef OS_WIN
static Time FromFileTime(FILETIME ft); static Time FromFileTime(FILETIME ft);
FILETIME ToFileTime() const; FILETIME ToFileTime() const;
#endif #endif

View file

@ -202,7 +202,7 @@ TimeTicks TimeTicks::HighResNow() {
return Now(); return Now();
} }
#if defined(OS_SOLARIS) #ifdef OS_SOLARIS
struct timespec TimeDelta::ToTimeSpec() const { struct timespec TimeDelta::ToTimeSpec() const {
int64_t microseconds = InMicroseconds(); int64_t microseconds = InMicroseconds();
time_t seconds = 0; time_t seconds = 0;

View file

@ -278,7 +278,7 @@ ProcessLink::OnChannelOpened()
#ifdef DEBUG #ifdef DEBUG
if (mExistingListener) { if (mExistingListener) {
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
std::queue<Message> pending; std::queue<Message> pending;
#else #else
queue<Message> pending; queue<Message> pending;
@ -298,7 +298,7 @@ void
ProcessLink::OnTakeConnectedChannel() ProcessLink::OnTakeConnectedChannel()
{ {
AssertIOThread(); AssertIOThread();
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
std::queue<Message> pending; std::queue<Message> pending;
#else #else
queue<Message> pending; queue<Message> pending;

View file

@ -239,7 +239,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp)
value = BooleanValue(true); value = BooleanValue(true);
if (!JS_SetProperty(cx, info, "intl-api", value)) if (!JS_SetProperty(cx, info, "intl-api", value))
return false; return false;
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
value = BooleanValue(false); value = BooleanValue(false);
#else #else
value = BooleanValue(true); value = BooleanValue(true);

View file

@ -685,7 +685,7 @@ MarkPagesUnused(void* p, size_t size)
return false; return false;
MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0); MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0);
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
int result = posix_madvise(p, size, POSIX_MADV_DONTNEED); int result = posix_madvise(p, size, POSIX_MADV_DONTNEED);
#else #else
int result = madvise(p, size, MADV_DONTNEED); int result = madvise(p, size, MADV_DONTNEED);

View file

@ -688,7 +688,7 @@ MOZ_WIN_MEM_TRY_BEGIN
// Success means optimized jar layout from bug 559961 is in effect // Success means optimized jar layout from bug 559961 is in effect
uint32_t readaheadLength = xtolong(startp); uint32_t readaheadLength = xtolong(startp);
if (readaheadLength) { if (readaheadLength) {
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
posix_madvise(const_cast<uint8_t*>(startp), readaheadLength, POSIX_MADV_WILLNEED); posix_madvise(const_cast<uint8_t*>(startp), readaheadLength, POSIX_MADV_WILLNEED);
#elif defined(XP_UNIX) #elif defined(XP_UNIX)
madvise(const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED); madvise(const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED);

View file

@ -30,7 +30,7 @@
#include "nsIObserverService.h" #include "nsIObserverService.h"
#include "nsIPrefService.h" #include "nsIPrefService.h"
#if defined(XP_WIN) #ifdef XP_WIN
#include <windows.h> #include <windows.h>
#else #else
#include <unistd.h> #include <unistd.h>
@ -385,7 +385,7 @@ nsTerminator::StartWatchdog()
} }
UniquePtr<Options> options(new Options()); UniquePtr<Options> options(new Options());
#if !defined(XP_SOLARIS) #ifdef XP_SOLARIS
const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000); const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000);
#else #else
const PRIntervalTime ticksDuration = 1000; const PRIntervalTime ticksDuration = 1000;

View file

@ -32,7 +32,7 @@
#endif #endif
#endif #endif
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
#include <sys/resource.h> #include <sys/resource.h>
#include <ucontext.h> #include <ucontext.h>
#endif #endif
@ -286,7 +286,7 @@ void InstallSignalHandlers(const char *aProgname)
} }
#endif #endif
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
#define NOFILES 512 #define NOFILES 512
// Boost Solaris file descriptors // Boost Solaris file descriptors

View file

@ -11,7 +11,7 @@
#include <cmath> #include <cmath>
#include <float.h> #include <float.h>
#if defined(XP_SOLARIS) #ifdef XP_SOLARIS
#include <math.h> #include <math.h>
#include <ieeefp.h> #include <ieeefp.h>
#endif #endif