Index: trunk/src/libs/xpcom18a4/Makefile.kmk
===================================================================
--- trunk/src/libs/xpcom18a4/Makefile.kmk	(revision 101873)
+++ trunk/src/libs/xpcom18a4/Makefile.kmk	(revision 101874)
@@ -487,5 +487,4 @@
 	nsprpub/pr/src/io/prlayer.c \
 	nsprpub/pr/src/io/prlog.c \
-	nsprpub/pr/src/io/prmmap.c \
 	nsprpub/pr/src/io/prpolevt.c \
 	nsprpub/pr/src/io/prprf.c \
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h	(revision 101873)
+++ trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h	(revision 101874)
@@ -467,27 +467,4 @@
 
 extern int _MD_unix_get_nonblocking_connect_error(int osfd);
-
-/* Memory-mapped files */
-
-struct _MDFileMap {
-    PRIntn prot;
-    PRIntn flags;
-    PRBool isAnonFM; /* when true, PR_CloseFileMap() must close the related fd */
-};
-
-extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size);
-#define _MD_CREATE_FILE_MAP _MD_CreateFileMap
-
-#define _MD_GET_MEM_MAP_ALIGNMENT() PR_GetPageSize()
-
-extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset,
-        PRUint32 len);
-#define _MD_MEM_MAP _MD_MemMap
-
-extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size);
-#define _MD_MEM_UNMAP _MD_MemUnmap
-
-extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap);
-#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
 
 /*
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/include/prio.h
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/include/prio.h	(revision 101873)
+++ trunk/src/libs/xpcom18a4/nsprpub/pr/include/prio.h	(revision 101874)
@@ -111,9 +111,4 @@
 #define PR_GetPeerName VBoxNsprPR_GetPeerName
 #define PR_GetSocketOption VBoxNsprPR_GetSocketOption
-#define PR_CreateFileMap VBoxNsprPR_CreateFileMap
-#define PR_GetMemMapAlignment VBoxNsprPR_GetMemMapAlignment
-#define PR_MemMap VBoxNsprPR_MemMap
-#define PR_MemUnmap VBoxNsprPR_MemUnmap
-#define PR_CloseFileMap VBoxNsprPR_CloseFileMap
 #define PR_CreatePipe VBoxNsprPR_CreatePipe
 #endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
@@ -1531,43 +1526,4 @@
 
 /*
- *********************************************************************
- *
- * Memory-mapped files
- *
- *********************************************************************
- */
-
-typedef struct PRFileMap PRFileMap;
-
-/*
- * protection options for read and write accesses of a file mapping
- */
-typedef enum PRFileMapProtect {
-    PR_PROT_READONLY,     /* read only */
-    PR_PROT_READWRITE,    /* readable, and write is shared */
-    PR_PROT_WRITECOPY     /* readable, and write is private (copy-on-write) */
-} PRFileMapProtect;
-
-NSPR_API(PRFileMap *) PR_CreateFileMap(
-    PRFileDesc *fd,
-    PRInt64 size,
-    PRFileMapProtect prot);
-
-/*
- * return the alignment (in bytes) of the offset argument to PR_MemMap
- */
-NSPR_API(PRInt32) PR_GetMemMapAlignment(void);
-
-NSPR_API(void *) PR_MemMap(
-    PRFileMap *fmap,
-    PROffset64 offset,  /* must be aligned and sized according to the
-                         * return value of PR_GetMemMapAlignment() */
-    PRUint32 len);
-
-NSPR_API(PRStatus) PR_MemUnmap(void *addr, PRUint32 len);
-
-NSPR_API(PRStatus) PR_CloseFileMap(PRFileMap *fmap);
-
-/*
  ******************************************************************
  *
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h	(revision 101873)
+++ trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h	(revision 101874)
@@ -466,10 +466,4 @@
 };
 
-struct PRFileMap {
-    PRFileDesc *fd;
-    PRFileMapProtect prot;
-    _MDFileMap md;
-};
-
 /************************************************************************/
 
@@ -676,25 +670,4 @@
 #define    _PR_MD_UNLOCKFILE _MD_UNLOCKFILE
 
-/* Memory-mapped files */
-
-extern PRStatus _PR_MD_CREATE_FILE_MAP(PRFileMap *fmap, PRInt64 size);
-#define _PR_MD_CREATE_FILE_MAP _MD_CREATE_FILE_MAP
-
-extern PRInt32 _PR_MD_GET_MEM_MAP_ALIGNMENT(void);
-#define _PR_MD_GET_MEM_MAP_ALIGNMENT _MD_GET_MEM_MAP_ALIGNMENT
-
-extern void * _PR_MD_MEM_MAP(
-    PRFileMap *fmap,
-    PROffset64 offset,
-    PRUint32 len);
-#define _PR_MD_MEM_MAP _MD_MEM_MAP
-
-extern PRStatus _PR_MD_MEM_UNMAP(void *addr, PRUint32 size);
-#define _PR_MD_MEM_UNMAP _MD_MEM_UNMAP
-
-extern PRStatus _PR_MD_CLOSE_FILE_MAP(PRFileMap *fmap);
-#define _PR_MD_CLOSE_FILE_MAP _MD_CLOSE_FILE_MAP
-
-
 /* Interprocess communications (IPC) */
 
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c	(revision 101873)
+++ trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c	(revision 101874)
@@ -748,129 +748,4 @@
 }
 
-#if defined(HAVE_FCNTL_FILE_LOCKING)
-
-PR_IMPLEMENT(PRStatus)
-_MD_LockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    struct flock arg;
-
-    arg.l_type = F_WRLCK;
-    arg.l_whence = SEEK_SET;
-    arg.l_start = 0;
-    arg.l_len = 0;  /* until EOF */
-    rv = fcntl(f, F_SETLKW, &arg);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-
-PR_IMPLEMENT(PRStatus)
-_MD_TLockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    struct flock arg;
-
-    arg.l_type = F_WRLCK;
-    arg.l_whence = SEEK_SET;
-    arg.l_start = 0;
-    arg.l_len = 0;  /* until EOF */
-    rv = fcntl(f, F_SETLK, &arg);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-
-PR_IMPLEMENT(PRStatus)
-_MD_UnlockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    struct flock arg;
-
-    arg.l_type = F_UNLCK;
-    arg.l_whence = SEEK_SET;
-    arg.l_start = 0;
-    arg.l_len = 0;  /* until EOF */
-    rv = fcntl(f, F_SETLK, &arg);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-
-#elif defined(HAVE_BSD_FLOCK)
-
-#include <sys/file.h>
-
-PR_IMPLEMENT(PRStatus)
-_MD_LockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    rv = flock(f, LOCK_EX);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-
-PR_IMPLEMENT(PRStatus)
-_MD_TLockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    rv = flock(f, LOCK_EX|LOCK_NB);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-
-PR_IMPLEMENT(PRStatus)
-_MD_UnlockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    rv = flock(f, LOCK_UN);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-#else
-
-PR_IMPLEMENT(PRStatus)
-_MD_LockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    rv = lockf(f, F_LOCK, 0);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-
-PR_IMPLEMENT(PRStatus)
-_MD_TLockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    rv = lockf(f, F_TLOCK, 0);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-
-PR_IMPLEMENT(PRStatus)
-_MD_UnlockFile(PRInt32 f)
-{
-    PRInt32 rv;
-    rv = lockf(f, F_ULOCK, 0);
-    if (rv == 0)
-        return PR_SUCCESS;
-    _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO());
-    return PR_FAILURE;
-}
-#endif
-
 PR_IMPLEMENT(PRStatus) _MD_gethostname(char *name, PRUint32 namelen)
 {
@@ -883,107 +758,4 @@
     _PR_MD_MAP_GETHOSTNAME_ERROR(_MD_ERRNO());
     return PR_FAILURE;
-}
-
-/*
- *******************************************************************
- *
- * Memory-mapped files
- *
- *******************************************************************
- */
-
-PRStatus _MD_CreateFileMap(PRFileMap *fmap, PRInt64 size)
-{
-    PRFileInfo info;
-    PRUint32 sz;
-
-    LL_L2UI(sz, size);
-    if (sz) {
-        if (PR_GetOpenFileInfo(fmap->fd, &info) == PR_FAILURE) {
-            return PR_FAILURE;
-        }
-        if (sz > info.size) {
-            /*
-             * Need to extend the file
-             */
-            if (fmap->prot != PR_PROT_READWRITE) {
-                PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, 0);
-                return PR_FAILURE;
-            }
-            if (PR_Seek(fmap->fd, sz - 1, PR_SEEK_SET) == -1) {
-                return PR_FAILURE;
-            }
-            if (PR_Write(fmap->fd, "", 1) != 1) {
-                return PR_FAILURE;
-            }
-        }
-    }
-    if (fmap->prot == PR_PROT_READONLY) {
-        fmap->md.prot = PROT_READ;
-#ifdef OSF1V4_MAP_PRIVATE_BUG
-        /*
-         * Use MAP_SHARED to work around a bug in OSF1 V4.0D
-         * (QAR 70220 in the OSF_QAR database) that results in
-         * corrupted data in the memory-mapped region.  This
-         * bug is fixed in V5.0.
-         */
-        fmap->md.flags = MAP_SHARED;
-#else
-        fmap->md.flags = MAP_PRIVATE;
-#endif
-    } else if (fmap->prot == PR_PROT_READWRITE) {
-        fmap->md.prot = PROT_READ | PROT_WRITE;
-        fmap->md.flags = MAP_SHARED;
-    } else {
-        PR_ASSERT(fmap->prot == PR_PROT_WRITECOPY);
-        fmap->md.prot = PROT_READ | PROT_WRITE;
-        fmap->md.flags = MAP_PRIVATE;
-    }
-    return PR_SUCCESS;
-}
-
-void * _MD_MemMap(
-    PRFileMap *fmap,
-    PRInt64 offset,
-    PRUint32 len)
-{
-    PRInt32 off;
-    void *addr;
-
-    LL_L2I(off, offset);
-    if ((addr = mmap(0, len, fmap->md.prot, fmap->md.flags,
-        fmap->fd->secret->md.osfd, off)) == (void *) -1) {
-            _PR_MD_MAP_MMAP_ERROR(_MD_ERRNO());
-        addr = NULL;
-    }
-    return addr;
-}
-
-PRStatus _MD_MemUnmap(void *addr, PRUint32 len)
-{
-    if (munmap(addr, len) == 0) {
-        return PR_SUCCESS;
-    } else {
-    if (errno == EINVAL) {
-            PR_SetError(PR_INVALID_ARGUMENT_ERROR, errno);
-    } else {
-        PR_SetError(PR_UNKNOWN_ERROR, errno);
-    }
-        return PR_FAILURE;
-    }
-}
-
-PRStatus _MD_CloseFileMap(PRFileMap *fmap)
-{
-    if ( PR_TRUE == fmap->md.isAnonFM ) {
-        PRStatus rc = PR_Close( fmap->fd );
-        if ( PR_FAILURE == rc ) {
-            PR_LOG( _pr_io_lm, PR_LOG_DEBUG,
-                ("_MD_CloseFileMap(): error closing anonymnous file map osfd"));
-            return PR_FAILURE;
-        }
-    }
-    PR_DELETE(fmap);
-    return PR_SUCCESS;
 }
 
