summaryrefslogtreecommitdiff
path: root/netwerk
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2014-09-24 16:59:47 +0200
committerPale Moon <git-repo@palemoon.org>2014-09-24 16:59:47 +0200
commit93b9490b500d9c053c236452df373bc46cae85c5 (patch)
tree9d57a2935bd7e4279b866b465a585be1714aeb87 /netwerk
parentf89dce3c82db7fabe2d3a933618f4d89a121ed2b (diff)
downloadpalemoon-gre-93b9490b500d9c053c236452df373bc46cae85c5.tar.gz
Remove OS/2 code part 1
Diffstat (limited to 'netwerk')
-rw-r--r--netwerk/base/src/moz.build6
-rw-r--r--netwerk/base/src/nsFileStreams.cpp10
-rw-r--r--netwerk/base/src/nsNetAddr.cpp14
-rw-r--r--netwerk/base/src/nsURLHelper.cpp2
-rw-r--r--netwerk/base/src/nsURLHelper.h2
-rw-r--r--netwerk/base/src/nsURLHelperOS2.cpp110
-rw-r--r--netwerk/base/src/nsURLParsers.cpp4
-rw-r--r--netwerk/base/src/nsURLParsers.h2
-rw-r--r--netwerk/cache/nsDiskCacheDevice.cpp8
-rw-r--r--netwerk/dns/DNS.cpp6
-rw-r--r--netwerk/dns/DNS.h8
-rw-r--r--netwerk/ipc/NeckoMessageUtils.h4
-rw-r--r--netwerk/protocol/file/nsFileProtocolHandler.cpp53
-rw-r--r--netwerk/protocol/http/nsHttpHandler.cpp22
-rw-r--r--netwerk/streamconv/test/TestStreamConv.cpp3
-rw-r--r--netwerk/test/TestOverlappedIO.cpp3
-rw-r--r--netwerk/test/TestSocketIO.cpp3
-rw-r--r--netwerk/test/TestSocketInput.cpp3
18 files changed, 23 insertions, 240 deletions
diff --git a/netwerk/base/src/moz.build b/netwerk/base/src/moz.build
index 760c1c146..f29e8fd17 100644
--- a/netwerk/base/src/moz.build
+++ b/netwerk/base/src/moz.build
@@ -72,11 +72,7 @@ CPP_SOURCES += [
'nsUnicharStreamLoader.cpp',
]
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
- CPP_SOURCES += [
- 'nsURLHelperOS2.cpp',
- ]
-elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
CPP_SOURCES += [
'nsURLHelperWin.cpp',
'nsNativeConnectionHelper.cpp',
diff --git a/netwerk/base/src/nsFileStreams.cpp b/netwerk/base/src/nsFileStreams.cpp
index ecc26aa19..2adb0e2ac 100644
--- a/netwerk/base/src/nsFileStreams.cpp
+++ b/netwerk/base/src/nsFileStreams.cpp
@@ -9,9 +9,6 @@
#include <unistd.h>
#elif defined(XP_WIN)
#include <windows.h>
-#elif defined(XP_OS2)
-#define INCL_DOSERRORS
-#include <os2.h>
#else
// XXX add necessary include file for ftruncate (or equivalent)
#endif
@@ -97,7 +94,7 @@ nsFileStreamBase::SetEOF()
if (mFD == nullptr)
return NS_BASE_STREAM_CLOSED;
-#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_BEOS)
// Some system calls require an EOF offset.
int64_t offset;
rv = Tell(&offset);
@@ -114,11 +111,6 @@ nsFileStreamBase::SetEOF()
NS_ERROR("SetEndOfFile failed");
return NS_ERROR_FAILURE;
}
-#elif defined(XP_OS2)
- if (DosSetFileSize((HFILE) PR_FileDesc2NativeHandle(mFD), offset) != NO_ERROR) {
- NS_ERROR("DosSetFileSize failed");
- return NS_ERROR_FAILURE;
- }
#else
// XXX not implemented
#endif
diff --git a/netwerk/base/src/nsNetAddr.cpp b/netwerk/base/src/nsNetAddr.cpp
index efbf7c2ec..5815d7059 100644
--- a/netwerk/base/src/nsNetAddr.cpp
+++ b/netwerk/base/src/nsNetAddr.cpp
@@ -30,7 +30,7 @@ NS_IMETHODIMP nsNetAddr::GetFamily(uint16_t *aFamily)
case AF_INET6:
*aFamily = nsINetAddr::FAMILY_INET6;
break;
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
case AF_LOCAL:
*aFamily = nsINetAddr::FAMILY_LOCAL;
break;
@@ -57,12 +57,12 @@ NS_IMETHODIMP nsNetAddr::GetAddress(nsACString & aAddress)
NetAddrToString(&mAddr, aAddress.BeginWriting(), kIPv6CStrBufSize);
aAddress.SetLength(strlen(aAddress.BeginReading()));
break;
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
case AF_LOCAL:
aAddress.Assign(mAddr.local.path);
break;
#endif
- // PR_AF_LOCAL falls through to default when not XP_UNIX || XP_OS2
+ // PR_AF_LOCAL falls through to default when not XP_UNIX
default:
return NS_ERROR_UNEXPECTED;
}
@@ -80,7 +80,7 @@ NS_IMETHODIMP nsNetAddr::GetPort(uint16_t *aPort)
case AF_INET6:
*aPort = ntohs(mAddr.inet6.port);
break;
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
case AF_LOCAL:
// There is no port number for local / connections.
return NS_ERROR_NOT_AVAILABLE;
@@ -100,7 +100,7 @@ NS_IMETHODIMP nsNetAddr::GetFlow(uint32_t *aFlow)
*aFlow = ntohl(mAddr.inet6.flowinfo);
break;
case AF_INET:
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
case AF_LOCAL:
#endif
// only for IPv6
@@ -120,7 +120,7 @@ NS_IMETHODIMP nsNetAddr::GetScope(uint32_t *aScope)
*aScope = ntohl(mAddr.inet6.scope_id);
break;
case AF_INET:
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
case AF_LOCAL:
#endif
// only for IPv6
@@ -140,7 +140,7 @@ NS_IMETHODIMP nsNetAddr::GetIsV4Mapped(bool *aIsV4Mapped)
*aIsV4Mapped = IPv6ADDR_IS_V4MAPPED(&mAddr.inet6.ip);
break;
case AF_INET:
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
case AF_LOCAL:
#endif
// only for IPv6
diff --git a/netwerk/base/src/nsURLHelper.cpp b/netwerk/base/src/nsURLHelper.cpp
index f2c3bbe54..b57467c55 100644
--- a/netwerk/base/src/nsURLHelper.cpp
+++ b/netwerk/base/src/nsURLHelper.cpp
@@ -622,7 +622,7 @@ net_FilterURIString(const char *str, nsACString& result)
return writing;
}
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
bool
net_NormalizeFileURL(const nsACString &aURL, nsCString &aResultBuf)
{
diff --git a/netwerk/base/src/nsURLHelper.h b/netwerk/base/src/nsURLHelper.h
index d5d9e0063..c84391f64 100644
--- a/netwerk/base/src/nsURLHelper.h
+++ b/netwerk/base/src/nsURLHelper.h
@@ -118,7 +118,7 @@ inline bool net_IsValidScheme(const nsAFlatCString &scheme)
*/
NS_HIDDEN_(bool) net_FilterURIString(const char *str, nsACString& result);
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
/**
* On Win32 and OS/2 system's a back-slash in a file:// URL is equivalent to a
* forward-slash. This function maps any back-slashes to forward-slashes.
diff --git a/netwerk/base/src/nsURLHelperOS2.cpp b/netwerk/base/src/nsURLHelperOS2.cpp
deleted file mode 100644
index fb7f0b20f..000000000
--- a/netwerk/base/src/nsURLHelperOS2.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 et cindent: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* OS/2-specific local file uri parsing */
-#define INCL_DOSERRORS
-#define INCL_DOS
-#include <os2.h>
-#include "nsURLHelper.h"
-#include "nsEscape.h"
-#include "nsIFile.h"
-
-nsresult
-net_GetURLSpecFromActualFile(nsIFile *aFile, nsACString &result)
-{
- nsresult rv;
- nsAutoString path;
-
- // construct URL spec from file path
- rv = aFile->GetPath(path);
- if (NS_FAILED(rv)) return rv;
-
- // Replace \ with / to convert to an url
- path.ReplaceChar(PRUnichar(0x5Cu), PRUnichar(0x2Fu));
-
- nsAutoCString escPath;
- NS_NAMED_LITERAL_CSTRING(prefix, "file:///");
-
- // Escape the path with the directory mask
- NS_ConvertUTF16toUTF8 ePath(path);
- if (NS_EscapeURL(ePath.get(), -1, esc_Directory+esc_Forced, escPath))
- escPath.Insert(prefix, 0);
- else
- escPath.Assign(prefix + ePath);
-
- // esc_Directory does not escape the semicolons, so if a filename
- // contains semicolons we need to manually escape them.
- // This replacement should be removed in bug #473280
- escPath.ReplaceSubstring(";", "%3b");
-
- result = escPath;
- return NS_OK;
-}
-
-nsresult
-net_GetFileFromURLSpec(const nsACString &aURL, nsIFile **result)
-{
- nsresult rv;
-
- nsCOMPtr<nsIFile> localFile(
- do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv));
- if (NS_FAILED(rv)) {
- NS_ERROR("Only nsIFile supported right now");
- return rv;
- }
-
- const nsACString *specPtr;
-
- nsAutoCString buf;
- if (net_NormalizeFileURL(aURL, buf))
- specPtr = &buf;
- else
- specPtr = &aURL;
-
- nsAutoCString directory, fileBaseName, fileExtension;
-
- rv = net_ParseFileURL(*specPtr, directory, fileBaseName, fileExtension);
- if (NS_FAILED(rv)) return rv;
-
- nsAutoCString path;
-
- if (!directory.IsEmpty()) {
- NS_EscapeURL(directory, esc_Directory|esc_AlwaysCopy, path);
- if (path.Length() > 2 && path.CharAt(2) == '|')
- path.SetCharAt(':', 2);
- path.ReplaceChar('/', '\\');
- }
- if (!fileBaseName.IsEmpty())
- NS_EscapeURL(fileBaseName, esc_FileBaseName|esc_AlwaysCopy, path);
- if (!fileExtension.IsEmpty()) {
- path += '.';
- NS_EscapeURL(fileExtension, esc_FileExtension|esc_AlwaysCopy, path);
- }
-
- NS_UnescapeURL(path);
- if (path.Length() != strlen(path.get()))
- return NS_ERROR_FILE_INVALID_PATH;
-
- // remove leading '\'
- if (path.CharAt(0) == '\\')
- path.Cut(0, 1);
-
- if (IsUTF8(path))
- rv = localFile->InitWithPath(NS_ConvertUTF8toUTF16(path));
- // XXX In rare cases, a valid UTF-8 string can be valid as a native
- // encoding (e.g. 0xC5 0x83 is valid both as UTF-8 and Windows-125x).
- // However, the chance is very low that a meaningful word in a legacy
- // encoding is valid as UTF-8.
- else
- // if path is not in UTF-8, assume it is encoded in the native charset
- rv = localFile->InitWithNativePath(path);
-
- if (NS_FAILED(rv)) return rv;
-
- NS_ADDREF(*result = localFile);
- return NS_OK;
-}
-
diff --git a/netwerk/base/src/nsURLParsers.cpp b/netwerk/base/src/nsURLParsers.cpp
index 03cfd7428..3e6d8db68 100644
--- a/netwerk/base/src/nsURLParsers.cpp
+++ b/netwerk/base/src/nsURLParsers.cpp
@@ -373,7 +373,7 @@ nsNoAuthURLParser::ParseAfterScheme(const char *spec, int32_t specLen,
const char *p = nullptr;
if (specLen > 2) {
// looks like there is an authority section
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
// if the authority looks like a drive number then we
// really want to treat it as part of the path
// [a-zA-Z][:|]{/\}
@@ -406,7 +406,7 @@ nsNoAuthURLParser::ParseAfterScheme(const char *spec, int32_t specLen,
SET_RESULT(path, pos, specLen - pos);
}
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
NS_IMETHODIMP
nsNoAuthURLParser::ParseFilePath(const char *filepath, int32_t filepathLen,
uint32_t *directoryPos, int32_t *directoryLen,
diff --git a/netwerk/base/src/nsURLParsers.h b/netwerk/base/src/nsURLParsers.h
index e3849dd2c..221f3d98d 100644
--- a/netwerk/base/src/nsURLParsers.h
+++ b/netwerk/base/src/nsURLParsers.h
@@ -45,7 +45,7 @@ class nsNoAuthURLParser MOZ_FINAL : public nsBaseURLParser
public:
NS_DECL_ISUPPORTS
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
NS_IMETHOD ParseFilePath(const char *, int32_t,
uint32_t *, int32_t *,
uint32_t *, int32_t *,
diff --git a/netwerk/cache/nsDiskCacheDevice.cpp b/netwerk/cache/nsDiskCacheDevice.cpp
index 998e01693..06a6d5440 100644
--- a/netwerk/cache/nsDiskCacheDevice.cpp
+++ b/netwerk/cache/nsDiskCacheDevice.cpp
@@ -16,9 +16,6 @@
#include <unistd.h>
#elif defined(XP_WIN)
#include <windows.h>
-#elif defined(XP_OS2)
-#define INCL_DOSERRORS
-#include <os2.h>
#else
// XXX add necessary include file for ftruncate (or equivalent)
#endif
@@ -353,11 +350,6 @@ nsDiskCache::Truncate(PRFileDesc * fd, uint32_t newEOF)
return NS_ERROR_FAILURE;
}
-#elif defined(XP_OS2)
- if (DosSetFileSize((HFILE) PR_FileDesc2NativeHandle(fd), newEOF) != NO_ERROR) {
- NS_ERROR("DosSetFileSize failed");
- return NS_ERROR_FAILURE;
- }
#else
// add implementations for other platforms here
#endif
diff --git a/netwerk/dns/DNS.cpp b/netwerk/dns/DNS.cpp
index 973ce247c..3b994ff83 100644
--- a/netwerk/dns/DNS.cpp
+++ b/netwerk/dns/DNS.cpp
@@ -62,7 +62,7 @@ void PRNetAddrToNetAddr(const PRNetAddr *prAddr, NetAddr *addr)
memcpy(&addr->inet6.ip, &prAddr->ipv6.ip, sizeof(addr->inet6.ip.u8));
addr->inet6.scope_id = prAddr->ipv6.scope_id;
}
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
else if (prAddr->raw.family == PR_AF_LOCAL) {
addr->local.family = AF_LOCAL;
memcpy(addr->local.path, prAddr->local.path, sizeof(addr->local.path));
@@ -86,7 +86,7 @@ void NetAddrToPRNetAddr(const NetAddr *addr, PRNetAddr *prAddr)
memcpy(&prAddr->ipv6.ip, &addr->inet6.ip, sizeof(addr->inet6.ip.u8));
prAddr->ipv6.scope_id = addr->inet6.scope_id;
}
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
else if (addr->raw.family == AF_LOCAL) {
prAddr->local.family = PR_AF_LOCAL;
memcpy(prAddr->local.path, addr->local.path, sizeof(addr->local.path));
@@ -112,7 +112,7 @@ bool NetAddrToString(const NetAddr *addr, char *buf, uint32_t bufSize)
memcpy(&nativeAddr.s6_addr, &addr->inet6.ip, sizeof(addr->inet6.ip.u8));
return !!inet_ntop_internal(AF_INET6, &nativeAddr, buf, bufSize);
}
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
else if (addr->raw.family == AF_LOCAL) {
if (bufSize < sizeof(addr->local.path)) {
return false;
diff --git a/netwerk/dns/DNS.h b/netwerk/dns/DNS.h
index 53841a0ff..1f0fcd46b 100644
--- a/netwerk/dns/DNS.h
+++ b/netwerk/dns/DNS.h
@@ -10,7 +10,7 @@
#include "prnetdb.h"
#include "mozilla/LinkedList.h"
-#if !defined(XP_WIN) && !defined(XP_OS2)
+#if !defined(XP_WIN)
#include <arpa/inet.h>
#endif
@@ -96,14 +96,10 @@ union NetAddr {
IPv6Addr ip; /* the actual 128 bits of address */
uint32_t scope_id; /* set of interfaces for a scope */
} inet6;
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
struct { /* Unix domain socket address */
uint16_t family; /* address family (AF_UNIX) */
-#ifdef XP_OS2
- char path[108]; /* null-terminated pathname */
-#else
char path[104]; /* null-terminated pathname */
-#endif
} local;
#endif
};
diff --git a/netwerk/ipc/NeckoMessageUtils.h b/netwerk/ipc/NeckoMessageUtils.h
index 93528608b..5509ecd0c 100644
--- a/netwerk/ipc/NeckoMessageUtils.h
+++ b/netwerk/ipc/NeckoMessageUtils.h
@@ -102,7 +102,7 @@ struct ParamTraits<mozilla::net::NetAddr>
WriteParam(aMsg, aParam.inet6.ip.u64[0]);
WriteParam(aMsg, aParam.inet6.ip.u64[1]);
WriteParam(aMsg, aParam.inet6.scope_id);
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
} else if (aParam.raw.family == AF_LOCAL) {
// Train's already off the rails: let's get a stack trace at least...
NS_RUNTIMEABORT("Error: please post stack trace to "
@@ -133,7 +133,7 @@ struct ParamTraits<mozilla::net::NetAddr>
ReadParam(aMsg, aIter, &aResult->inet6.ip.u64[0]) &&
ReadParam(aMsg, aIter, &aResult->inet6.ip.u64[1]) &&
ReadParam(aMsg, aIter, &aResult->inet6.scope_id);
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
} else if (aResult->raw.family == AF_LOCAL) {
return aMsg->ReadBytes(aIter,
reinterpret_cast<const char**>(&aResult->local.path),
diff --git a/netwerk/protocol/file/nsFileProtocolHandler.cpp b/netwerk/protocol/file/nsFileProtocolHandler.cpp
index eab73befe..32853d3ea 100644
--- a/netwerk/protocol/file/nsFileProtocolHandler.cpp
+++ b/netwerk/protocol/file/nsFileProtocolHandler.cpp
@@ -26,13 +26,6 @@
#endif
#endif
-// URL file handling for OS/2
-#ifdef XP_OS2
-#include "prio.h"
-#include "nsIFileURL.h"
-#include "nsILocalFileOS2.h"
-#endif
-
// URL file handling for freedesktop.org
#ifdef XP_UNIX
#include "nsINIParser.h"
@@ -104,50 +97,6 @@ nsFileProtocolHandler::ReadURLFile(nsIFile* aFile, nsIURI** aURI)
return rv;
}
-#elif defined(XP_OS2)
-NS_IMETHODIMP
-nsFileProtocolHandler::ReadURLFile(nsIFile* aFile, nsIURI** aURI)
-{
- nsresult rv;
-
- nsCOMPtr<nsILocalFileOS2> os2File (do_QueryInterface(aFile, &rv));
- if (NS_FAILED(rv))
- return NS_ERROR_NOT_AVAILABLE;
-
- // see if this file is a WPS UrlObject
- bool isUrl;
- rv = os2File->IsFileType(NS_LITERAL_CSTRING("UniformResourceLocator"),
- &isUrl);
- if (NS_FAILED(rv) || !isUrl)
- return NS_ERROR_NOT_AVAILABLE;
-
- // if so, open it & get its size
- PRFileDesc *file;
- rv = os2File->OpenNSPRFileDesc(PR_RDONLY, 0, &file);
- if (NS_FAILED(rv))
- return NS_ERROR_NOT_AVAILABLE;
-
- int64_t fileSize;
- os2File->GetFileSize(&fileSize);
- rv = NS_ERROR_NOT_AVAILABLE;
-
- // get a buffer, read the entire file, then create
- // an nsURI; we assume the string is already escaped
- char * buffer = (char*)NS_Alloc(fileSize+1);
- if (buffer) {
- int32_t cnt = PR_Read(file, buffer, fileSize);
- if (cnt > 0) {
- buffer[cnt] = '\0';
- if (NS_SUCCEEDED(NS_NewURI(aURI, nsDependentCString(buffer))))
- rv = NS_OK;
- }
- NS_Free(buffer);
- }
- PR_Close(file);
-
- return rv;
-}
-
#elif defined(XP_UNIX)
NS_IMETHODIMP
nsFileProtocolHandler::ReadURLFile(nsIFile* aFile, nsIURI** aURI)
@@ -219,7 +168,7 @@ nsFileProtocolHandler::NewURI(const nsACString &spec,
const nsACString *specPtr = &spec;
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
nsAutoCString buf;
if (net_NormalizeFileURL(spec, buf))
specPtr = &buf;
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
index 022bc1b4c..07feeab0f 100644
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -60,11 +60,6 @@
#include <CoreServices/CoreServices.h>
#endif
-#if defined(XP_OS2)
-#define INCL_DOSMISC
-#include <os2.h>
-#endif
-
//-----------------------------------------------------------------------------
using namespace mozilla;
using namespace mozilla::net;
@@ -648,8 +643,6 @@ nsHttpHandler::InitUserAgentComponents()
mPlatform.AssignLiteral(
#if defined(ANDROID)
"Android"
-#elif defined(XP_OS2)
- "OS/2"
#elif defined(XP_WIN)
"Windows"
#elif defined(XP_MACOSX)
@@ -676,20 +669,7 @@ nsHttpHandler::InitUserAgentComponents()
#ifndef MOZ_UA_OS_AGNOSTIC
// Gather OS/CPU.
-#if defined(XP_OS2)
- ULONG os2ver = 0;
- DosQuerySysInfo(QSV_VERSION_MINOR, QSV_VERSION_MINOR,
- &os2ver, sizeof(os2ver));
- if (os2ver == 11)
- mOscpu.AssignLiteral("2.11");
- else if (os2ver == 30)
- mOscpu.AssignLiteral("Warp 3");
- else if (os2ver == 40)
- mOscpu.AssignLiteral("Warp 4");
- else if (os2ver == 45)
- mOscpu.AssignLiteral("Warp 4.5");
-
-#elif defined(XP_WIN)
+#if defined(XP_WIN)
OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
if (GetVersionEx(&info)) {
const char *format;
diff --git a/netwerk/streamconv/test/TestStreamConv.cpp b/netwerk/streamconv/test/TestStreamConv.cpp
index 0a3c7d26e..df32e90b2 100644
--- a/netwerk/streamconv/test/TestStreamConv.cpp
+++ b/netwerk/streamconv/test/TestStreamConv.cpp
@@ -28,9 +28,6 @@
#ifdef XP_WIN
#include <windows.h>
#endif
-#ifdef XP_OS2
-#include <os2.h>
-#endif
static int gKeepRunning = 0;
/////////////////////////////////
diff --git a/netwerk/test/TestOverlappedIO.cpp b/netwerk/test/TestOverlappedIO.cpp
index c4bfd670d..59417147d 100644
--- a/netwerk/test/TestOverlappedIO.cpp
+++ b/netwerk/test/TestOverlappedIO.cpp
@@ -9,9 +9,6 @@
#ifdef WIN32
#include <windows.h>
#endif
-#ifdef OS2
-#include <os2.h>
-#endif
#include "nspr.h"
#include "nscore.h"
diff --git a/netwerk/test/TestSocketIO.cpp b/netwerk/test/TestSocketIO.cpp
index 0c9cd4d9f..5da97bffb 100644
--- a/netwerk/test/TestSocketIO.cpp
+++ b/netwerk/test/TestSocketIO.cpp
@@ -8,9 +8,6 @@
#ifdef WIN32
#include <windows.h>
#endif
-#ifdef OS2
-#include <os2.h>
-#endif
#include "nspr.h"
#include "nscore.h"
diff --git a/netwerk/test/TestSocketInput.cpp b/netwerk/test/TestSocketInput.cpp
index 05ad71781..e06026a07 100644
--- a/netwerk/test/TestSocketInput.cpp
+++ b/netwerk/test/TestSocketInput.cpp
@@ -7,9 +7,6 @@
#ifdef WIN32
#include <windows.h>
#endif
-#ifdef XP_OS2
-#include <os2.h>
-#endif
#include "nscore.h"
#include "nsCOMPtr.h"