This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Time for glibc 2.1.3?


At 06:50 -0800 2000-02-15, Ulrich Drepper wrote:
>Andreas Jaeger <aj@suse.de> writes:
>
>> what kind of showstoppers to we have for glibc 2.1.3?  What are your
>> plans for releasing 2.1.3?
>> 
>> I don't see any showstoppers for now.
>
>Geoff said there are big problems with PPC.

I've only encountered mmap64 and syscalls.list issues, but that works fine after
applying from the mainline Geoff's changes in those areas.

This is the diff:
Index: sysdeps/unix/sysv/linux/powerpc/syscalls.list
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/syscalls.list,v
retrieving revision 1.13.2.3
diff -u -r1.13.2.3 syscalls.list
--- sysdeps/unix/sysv/linux/powerpc/syscalls.list	1999/12/02 08:25:29	1.13.2.3
+++ sysdeps/unix/sysv/linux/powerpc/syscalls.list	2000/01/28 02:27:23
@@ -12,12 +12,16 @@
 rt_sigqueueinfo	-	rt_sigqueueinfo	3	__syscall_rt_sigqueueinfo
 rt_sigsuspend	-	rt_sigsuspend	2	__syscall_rt_sigsuspend
 rt_sigtimedwait	-	rt_sigtimedwait	4	__syscall_rt_sigtimedwait
+s_fstat64	fxstat64 fstat64	2	__syscall_fstat64
+s_ftruncate64	ftruncate64 ftruncate64	3	__syscall_ftruncate64
 s_getcwd	getcwd	getcwd		2	__syscall_getcwd
 s_getdents	getdents getdents	3	__syscall_getdents
 s_getpriority	getpriority getpriority	2	__syscall_getpriority
 s_getresgid	getresgid getresgid	3	__syscall_getresgid
 s_getresuid	getresuid getresuid	3	__syscall_getresuid
 s_getrlimit	getrlimit getrlimit	2	__syscall_getrlimit
+s_lstat64	lxstat64 lstat64	2	__syscall_lstat64
+s_mmap2		mmap64	mmap2		6	__syscall_mmap2
 s_poll		poll	poll		3	__syscall_poll
 s_pread64	pread64	pread		5	__syscall_pread
 s_ptrace	ptrace	ptrace		4	__syscall_ptrace
@@ -28,8 +32,9 @@
 s_sigpending	sigpending sigpending	1	__syscall_sigpending
 s_sigprocmask	sigprocmask sigprocmask	3	__syscall_sigprocmask
 s_sigsuspend	sigsuspend sigsuspend	3	__syscall_sigsuspend
+s_stat64	xstat64 stat64		2	__syscall_stat64
 s_sysctl	sysctl	_sysctl		1	__syscall__sysctl
-s_ugetrlimit	getrlimit ugetrlimit	2	__syscall_ugetrlimit
+s_truncate64	truncate64 truncate64	3	__syscall_truncate64
 s_ustat		ustat	ustat		2	__syscall_ustat
 s_vfork		vfork	vfork		0	__syscall_vfork
 sys_fstat	fxstat	fstat		2	__syscall_fstat
--- /dev/null	Thu Apr 30 06:04:17 1998
+++ sysdeps/unix/sysv/linux/powerpc/mmap64.c	Thu Jan 27 18:21:02 2000
@@ -0,0 +1,63 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@redhat.com>, 1999.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <sys/mman.h>
+
+#include <asm/page.h>
+
+#ifdef __NR_mmap2
+extern int __syscall_mmap2(__ptr_t, size_t, int, int, int, off_t);
+static int have_no_mmap2;
+#endif
+
+__ptr_t
+__mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, off64_t offset)
+{
+#ifdef __NR_mmap2
+  if (! have_no_mmap2 && ! (offset & PAGE_MASK))
+    {
+      int saved_errno = errno;
+
+      /* This will be always 12, no matter what page size is.  */
+      int result = INLINE_SYSCALL (mmap2, 6, addr, len, prot, flags,
+				   fd, (off_t) (offset >> PAGE_SHIFT));
+
+      if (result != -1 || errno != ENOSYS)
+	return result;
+
+      __set_errno (saved_errno);
+      have_no_mmap2 = 1;
+    }
+#endif
+  if (offset != (off_t) offset || (offset + len) != (off_t) (offset + len))
+    {
+      __set_errno (EINVAL);
+      return MAP_FAILED;
+    }
+
+  return __mmap (addr, len, prot, flags, fd, (off_t) offset);
+}
+
+weak_alias (__mmap64, mmap64)
-- 
Joel Klecker (aka Espy)                    Debian GNU/Linux Developer
<URL:mailto:jk@espy.org>                 <URL:mailto:espy@debian.org>
<URL:http://web.espy.org/>               <URL:http://www.debian.org/>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]