Bug 1227569 - Remove unsupported OpenVMS code. r=mccr8
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Fri, 18 Dec 2015 15:02:50 +0200
changeset 276899 279077cb41922135036667f26fd80ab8a6d65525
parent 276898 22bb9e57553b227f3d55a1f71010b8ab1e7c2ffa
child 276900 8feecfc42ddde37ac5273b98c9f9ce114b86c897
push id69321
push userbirunthan@mohanathas.com
push dateFri, 18 Dec 2015 13:03:12 +0000
treeherdermozilla-inbound@541be3cffed3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1227569
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1227569 - Remove unsupported OpenVMS code. r=mccr8
config/system-headers
modules/libpref/Preferences.cpp
toolkit/profile/nsProfileLock.cpp
uriloader/exthandler/nsExternalHelperAppService.cpp
xpcom/components/nsNativeModuleLoader.cpp
xpcom/io/SpecialSystemDirectory.cpp
xpcom/io/nsLocalFileUnix.cpp
--- a/config/system-headers
+++ b/config/system-headers
@@ -413,17 +413,16 @@ Entry.h
 errno.h
 Errors.h
 Events.h
 exdisp.h
 ExDisp.h
 exe386.h
 execinfo.h
 extras.h
-fabdef.h
 fcntl.h
 features.h
 fibdef.h
 File.h
 filehdr.h
 files.h
 Files.h
 FindDirectory.h
@@ -623,17 +622,16 @@ libc_r.h
 libelf.h
 libelf/libelf.h
 libgen.h
 libgnome/gnome-url.h
 libgnome/libgnome.h
 libgnomeui/gnome-icon-lookup.h
 libgnomeui/gnome-icon-theme.h
 libgnomeui/gnome-ui-init.h
-lib$routines.h
 limits
 limits.h
 link.h
 #ifdef ANDROID
 linux/android_alarm.h
 linux/ashmem.h
 #endif
 linux/ioprio.h
@@ -884,17 +882,16 @@ rasdlg.h
 raserror.h
 ras.h
 regex.h
 Region.h
 resolv.h
 Resources.h
 Retrace.h
 rld_interface.h
-rmsdef.h
 Roster.h
 rpc.h
 rpcproxy.h
 rpc/types.h
 sane/sane.h
 sane/sanei.h
 sane/saneopts.h
 sched.h
@@ -922,17 +919,16 @@ signal.h
 SimpleGameSound.h
 SIOUX.h
 size_t.h
 sndio.h
 someincludefile.h
 Sound.h
 soundcard.h
 sqlite3.h
-ssdef.h
 sstream
 stack
 #ifdef ANDROID
 stagefright/AACWriter.h
 stagefright/AMRWriter.h
 stagefright/AudioSource.h
 stagefright/DataSource.h
 stagefright/foundation/ABase.h
@@ -1149,17 +1145,16 @@ UNavServicesDialogs.h
 UnicodeBlockObjects.h
 UnicodeConverter.h
 UnicodeUtilities.h
 unidef.h
 unikbd.h
 unistd.h
 unix.h
 unixio.h
-unixlib.h
 unknwn.h
 UPrinting.h
 UQuickTime.h
 UReanimator.h
 URegions.h
 URegistrar.h
 UResourceMgr.h
 utility
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -1265,19 +1265,17 @@ static nsresult pref_InitInitialObjects(
   /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
   static const char* specialFiles[] = {
 #if defined(XP_MACOSX)
     "macprefs.js"
 #elif defined(XP_WIN)
     "winpref.js"
 #elif defined(XP_UNIX)
     "unix.js"
-#if defined(VMS)
-    , "openvms.js"
-#elif defined(_AIX)
+#if defined(_AIX)
     , "aix.js"
 #endif
 #elif defined(XP_BEOS)
     "beos.js"
 #endif
   };
 
   rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles));
--- a/toolkit/profile/nsProfileLock.cpp
+++ b/toolkit/profile/nsProfileLock.cpp
@@ -25,20 +25,16 @@
 #include <signal.h>
 #include <stdlib.h>
 #include "prnetdb.h"
 #include "prsystem.h"
 #include "prprf.h"
 #include "prenv.h"
 #endif
 
-#ifdef VMS
-#include <rmsdef.h>
-#endif
-
 #if defined(MOZ_WIDGET_GONK) && !defined(MOZ_CRASHREPORTER)
 #include <sys/syscall.h>
 #endif
 
 // **********************************************************************
 // class nsProfileLock
 //
 // This code was moved from profile/src/nsProfileAccess.
@@ -612,37 +608,16 @@ nsresult nsProfileLock::Lock(nsIFile* aP
           if (NS_SUCCEEDED(unlocker->Init())) {
             nsCOMPtr<nsIProfileUnlocker> unlockerInterface(
                                                       do_QueryObject(unlocker));
             unlockerInterface.forget(aUnlocker);
           }
         }
         return NS_ERROR_FILE_ACCESS_DENIED;
     }
-#elif defined(VMS)
-    nsAutoCString filePath;
-    rv = lockFile->GetNativePath(filePath);
-    if (NS_FAILED(rv))
-        return rv;
-
-    lockFile->GetLastModifiedTime(&mReplacedLockTime);
-
-    mLockFileDesc = open_noshr(filePath.get(), O_CREAT, 0666);
-    if (mLockFileDesc == -1)
-    {
-        if ((errno == EVMSERR) && (vaxc$errno == RMS$_FLK))
-        {
-            return NS_ERROR_FILE_ACCESS_DENIED;
-        }
-        else
-        {
-            NS_ERROR("Failed to open lock file.");
-            return NS_ERROR_FAILURE;
-        }
-    }
 #endif
 
     mHaveLock = true;
 
     return rv;
 }
 
 
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -547,19 +547,17 @@ struct nsExtraMimeTypeEntry {
  * This table lists all of the 'extra' content types that we can deduce from particular
  * file extensions.  These entries also ensure that we provide a good descriptive name
  * when we encounter files with these content types and/or extensions.  These can be
  * overridden by user helper app prefs.
  * If you add types here, make sure they are lowercase, or you'll regret it.
  */
 static nsExtraMimeTypeEntry extraMimeEntries [] =
 {
-#if defined(VMS)
-  { APPLICATION_OCTET_STREAM, "exe,com,bin,sav,bck,pcsi,dcx_axpexe,dcx_vaxexe,sfx_axpexe,sfx_vaxexe", "Binary File" },
-#elif defined(XP_MACOSX) // don't define .bin on the mac...use internet config to look that up...
+#if defined(XP_MACOSX) // don't define .bin on the mac...use internet config to look that up...
   { APPLICATION_OCTET_STREAM, "exe,com", "Binary File" },
 #else
   { APPLICATION_OCTET_STREAM, "exe,com,bin", "Binary File" },
 #endif
   { APPLICATION_GZIP2, "gz", "gzip" },
   { "application/x-arj", "arj", "ARJ file" },
   { "application/rtf", "rtf", "Rich Text Format File" },
   { APPLICATION_XPINSTALL, "xpi", "XPInstall Install" },
--- a/xpcom/components/nsNativeModuleLoader.cpp
+++ b/xpcom/components/nsNativeModuleLoader.cpp
@@ -33,21 +33,16 @@
 #ifdef XP_WIN
 #include <windows.h>
 #endif
 
 #ifdef XP_MACOSX
 #include <signal.h>
 #endif
 
-#ifdef VMS
-#include <lib$routines.h>
-#include <ssdef.h>
-#endif
-
 #ifdef DEBUG
 #define IMPLEMENT_BREAK_AFTER_LOAD
 #endif
 
 using namespace mozilla;
 
 static LazyLogModule sNativeModuleLoaderLog("nsNativeModuleLoader");
 #define LOG(level, args) MOZ_LOG(sNativeModuleLoaderLog, level, args)
--- a/xpcom/io/SpecialSystemDirectory.cpp
+++ b/xpcom/io/SpecialSystemDirectory.cpp
@@ -29,20 +29,16 @@ using mozilla::IsWin7OrLater;
 #include <limits.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/param.h>
 #include "prenv.h"
 
 #endif
 
-#if defined(VMS)
-#include <unixlib.h>
-#endif
-
 #ifndef MAXPATHLEN
 #ifdef PATH_MAX
 #define MAXPATHLEN PATH_MAX
 #elif defined(MAX_PATH)
 #define MAXPATHLEN MAX_PATH
 #elif defined(_MAX_PATH)
 #define MAXPATHLEN _MAX_PATH
 #elif defined(CCHMAXPATH)
@@ -216,29 +212,17 @@ GetRegWindowsAppDataFolder(bool aLocal, 
 }
 
 #endif // XP_WIN
 
 #if defined(XP_UNIX)
 static nsresult
 GetUnixHomeDir(nsIFile** aFile)
 {
-#ifdef VMS
-  char* pHome;
-  pHome = getenv("HOME");
-  if (*pHome == '/') {
-    return NS_NewNativeLocalFile(nsDependentCString(pHome),
-                                 true,
-                                 aFile);
-  } else {
-    return NS_NewNativeLocalFile(nsDependentCString(decc$translate_vms(pHome)),
-                                 true,
-                                 aFile);
-  }
-#elif defined(ANDROID)
+#if defined(ANDROID)
   // XXX no home dir on android; maybe we should return the sdcard if present?
   return NS_ERROR_FAILURE;
 #else
   return NS_NewNativeLocalFile(nsDependentCString(PR_GetEnv("HOME")),
                                true, aFile);
 #endif
 }
 
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -15,19 +15,16 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <utime.h>
 #include <dirent.h>
 #include <ctype.h>
 #include <locale.h>
-#if defined(VMS)
-#include <fabdef.h>
-#endif
 
 #if defined(HAVE_SYS_QUOTA_H) && defined(HAVE_LINUX_QUOTA_H)
 #define USE_LINUX_QUOTACTL
 #include <sys/mount.h>
 #include <sys/quota.h>
 #ifndef BLOCK_SIZE
 #define BLOCK_SIZE 1024 /* kernel block size */
 #endif
@@ -1002,21 +999,17 @@ nsLocalFile::MoveToNative(nsIFile* aNewP
   nsAutoCString newPathName;
   rv = GetNativeTargetPathName(aNewParent, aNewName, newPathName);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   // try for atomic rename, falling back to copy/delete
   if (rename(mPath.get(), newPathName.get()) < 0) {
-#ifdef VMS
-    if (errno == EXDEV || errno == ENXIO) {
-#else
     if (errno == EXDEV) {
-#endif
       rv = CopyToNative(aNewParent, aNewName);
       if (NS_SUCCEEDED(rv)) {
         rv = Remove(true);
       }
     } else {
       rv = NSRESULT_FOR_ERRNO();
     }
   }
@@ -1226,24 +1219,16 @@ NS_IMETHODIMP
 nsLocalFile::GetFileSize(int64_t* aFileSize)
 {
   if (NS_WARN_IF(!aFileSize)) {
     return NS_ERROR_INVALID_ARG;
   }
   *aFileSize = 0;
   ENSURE_STAT_CACHE();
 
-#if defined(VMS)
-  /* Only two record formats can report correct file content size */
-  if ((mCachedStat.st_fab_rfm != FAB$C_STMLF) &&
-      (mCachedStat.st_fab_rfm != FAB$C_STMCR)) {
-    return NS_ERROR_FAILURE;
-  }
-#endif
-
   if (!S_ISDIR(mCachedStat.st_mode)) {
     *aFileSize = (int64_t)mCachedStat.st_size;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsLocalFile::SetFileSize(int64_t aFileSize)
@@ -2172,21 +2157,17 @@ nsLocalFile::RenameToNative(nsIFile* aNe
   nsAutoCString newPathName;
   rv = GetNativeTargetPathName(aNewParentDir, aNewName, newPathName);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   // try for atomic rename
   if (rename(mPath.get(), newPathName.get()) < 0) {
-#ifdef VMS
-    if (errno == EXDEV || errno == ENXIO) {
-#else
     if (errno == EXDEV) {
-#endif
       rv = NS_ERROR_FILE_ACCESS_DENIED;
     } else {
       rv = NSRESULT_FOR_ERRNO();
     }
   }
 
   return rv;
 }