From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13782 invoked by alias); 27 Jul 2012 13:48:45 -0000 Received: (qmail 13768 invoked by uid 22791); 27 Jul 2012 13:48:43 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jul 2012 13:48:29 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Suku5-0004UG-7d from joseph_myers@mentor.com for libc-ports@sourceware.org; Fri, 27 Jul 2012 06:48:29 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 27 Jul 2012 06:48:29 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Fri, 27 Jul 2012 14:48:26 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1Suku1-0006ts-KX for libc-ports@sourceware.org; Fri, 27 Jul 2012 13:48:25 +0000 Date: Fri, 27 Jul 2012 13:48:00 -0000 From: "Joseph S. Myers" To: Subject: Make mmap64 an alias of mmap on MIPS64 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00066.txt.bz2 On MIPS64, both n32 and n64, there is only an mmap syscall, taking a 64-bit offset argument, and no mmap2. This means it is appropriate for them to have mmap and mmap64 as aliases, as done for sysdeps/unix/sysv/linux/wordsize-64 architectures, rather than using sysdeps/unix/sysv/linux/mmap64.c. I've applied this patch to implement this. For n64 this is simply a bit more efficient; for n32 it should mean mmap64 actually works for 64-bit offsets that would previously have been rejected. This showed up in the course of working out what's needed to eliminate __ASSUME_MMAP2_SYSCALL. diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips index 2a5cf36..a1b6dc5 100644 --- a/ports/ChangeLog.mips +++ b/ports/ChangeLog.mips @@ -1,3 +1,8 @@ +2012-07-27 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): New. + * sysdeps/unix/sysv/linux/mips/mips64/mmap64.c: New file. + 2012-07-25 Florian Weimer * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Add diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c new file mode 100644 index 0000000..0dbd384 --- /dev/null +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/mmap64.c @@ -0,0 +1 @@ +/* mmap64 is the same as mmap. */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list index 867323a..50d5ba3 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list +++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list @@ -2,6 +2,8 @@ lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64 +mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 + ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 truncate - truncate i:si truncate truncate64 -- Joseph S. Myers joseph@codesourcery.com