summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2019-10-07 03:27:01 -0500
committerathenian200 <athenian200@outlook.com>2019-10-21 04:53:44 -0500
commit7d65eb2b3a345abe22f42361e00c97da2e968009 (patch)
tree892ec22e404797b68ed9a5026fd48609f73fc547
parent5a4a4990cd9f5d0b56d515b0246bc09da7109eb3 (diff)
downloadUXP-7d65eb2b3a345abe22f42361e00c97da2e968009.tar
UXP-7d65eb2b3a345abe22f42361e00c97da2e968009.tar.gz
UXP-7d65eb2b3a345abe22f42361e00c97da2e968009.tar.lz
UXP-7d65eb2b3a345abe22f42361e00c97da2e968009.tar.xz
UXP-7d65eb2b3a345abe22f42361e00c97da2e968009.zip
MoonchildProductions#1251 - Part 22: Remove some unused type declarations from IPC process_util.
https://bugzilla.mozilla.org/show_bug.cgi?id=1397928 Was looking into that _POSIX_PATH_MAX/NAME_MAX issue earlier because it didn't make a lot of sense and I was thinking of other approaches besides char arrays, and I wanted to make sure it didn't cause problems after they did it. Turns out that one commit after this was added, Mozilla determined the code I was working on fixing to be dead code as of Firefox 58. I don't know if it's dead code in Pale Moon as well, but given that it compiles fine without it and I can't find any other references to szExeFile in the IPC code, that seems like a safe bet. Besides, I determined config/pathsub.c already seems to do what this code looks like it's trying to do, and implements the solution of just defining NAME_MAX to 256 and having done with it that I nearly adopted after realizing that even OS/2 and BeOS, let alone Unix/Linux systems, all basically use that value and there's just disagreement on which system header to check for it.
-rw-r--r--ipc/chromium/src/base/process_util.h23
-rw-r--r--ipc/chromium/src/base/process_util_linux.cc5
-rw-r--r--widget/GfxInfoX11.cpp2
3 files changed, 2 insertions, 28 deletions
diff --git a/ipc/chromium/src/base/process_util.h b/ipc/chromium/src/base/process_util.h
index 9b1e4fed5..4bb125681 100644
--- a/ipc/chromium/src/base/process_util.h
+++ b/ipc/chromium/src/base/process_util.h
@@ -39,28 +39,7 @@
#include "base/command_line.h"
#include "base/process.h"
-#if defined(OS_WIN)
-typedef PROCESSENTRY32 ProcessEntry;
-typedef IO_COUNTERS IoCounters;
-#elif defined(OS_POSIX)
-// TODO(port): we should not rely on a Win32 structure.
-// Using NAME_MAX here would raise POSIX compliance issues
-// (see Mozilla bug 1364865).
-struct ProcessEntry {
- int pid;
- int ppid;
- char szExeFile[_POSIX_PATH_MAX + 1];
-};
-
-struct IoCounters {
- unsigned long long ReadOperationCount;
- unsigned long long WriteOperationCount;
- unsigned long long OtherOperationCount;
- unsigned long long ReadTransferCount;
- unsigned long long WriteTransferCount;
- unsigned long long OtherTransferCount;
-};
-
+#if defined(OS_POSIX)
#include "base/file_descriptor_shuffle.h"
#endif
diff --git a/ipc/chromium/src/base/process_util_linux.cc b/ipc/chromium/src/base/process_util_linux.cc
index 57388ccb0..a0d5ae816 100644
--- a/ipc/chromium/src/base/process_util_linux.cc
+++ b/ipc/chromium/src/base/process_util_linux.cc
@@ -34,11 +34,6 @@
namespace {
-enum ParsingState {
- KEY_NAME,
- KEY_VALUE
-};
-
static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
} // namespace
diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp
index 98a4bb965..05a2cab1a 100644
--- a/widget/GfxInfoX11.cpp
+++ b/widget/GfxInfoX11.cpp
@@ -192,7 +192,7 @@ GfxInfo::GetData()
// and a buffer as some kind of workaround. They've been implementing
// missing functions lately, though, so this may not be needed much longer.
-#if defined(XP_SOLARIS)
+#ifndef strcasestr
#define strcasestr PL_strcasestr
#endif