[Glibc-bsd-commits] r4432 - trunk/glibc-ports/kfreebsd

Petr Salinger ps-guest at alioth.debian.org
Mon May 13 17:54:15 UTC 2013


Author: ps-guest
Date: 2013-05-13 17:54:15 +0000 (Mon, 13 May 2013)
New Revision: 4432

Added:
   trunk/glibc-ports/kfreebsd/dl-openat64.c
Modified:
   trunk/glibc-ports/kfreebsd/Makefile
   trunk/glibc-ports/kfreebsd/getcwd.c
Log:
re-enable fallback of getcwd() in rtld


Modified: trunk/glibc-ports/kfreebsd/Makefile
===================================================================
--- trunk/glibc-ports/kfreebsd/Makefile	2013-05-11 18:18:01 UTC (rev 4431)
+++ trunk/glibc-ports/kfreebsd/Makefile	2013-05-13 17:54:15 UTC (rev 4432)
@@ -126,7 +126,7 @@
 
 # Special ELF hacks.
 ifeq ($(subdir),elf)
-sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd
+sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64
 sysdep_routines += sys_umtx
 endif
 

Added: trunk/glibc-ports/kfreebsd/dl-openat64.c
===================================================================
--- trunk/glibc-ports/kfreebsd/dl-openat64.c	                        (rev 0)
+++ trunk/glibc-ports/kfreebsd/dl-openat64.c	2013-05-13 17:54:15 UTC (rev 4432)
@@ -0,0 +1,36 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper at gmain.com>, 2003.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+
+int
+openat64 (dfd, file, oflag)
+     int dfd;
+     const char *file;
+     int oflag;
+{
+  assert ((oflag & O_CREAT) == 0);
+
+  return INLINE_SYSCALL (openat, 4, dfd, file, oflag, 0);
+}
+
+strong_alias (openat64, __openat_nocancel)

Modified: trunk/glibc-ports/kfreebsd/getcwd.c
===================================================================
--- trunk/glibc-ports/kfreebsd/getcwd.c	2013-05-11 18:18:01 UTC (rev 4431)
+++ trunk/glibc-ports/kfreebsd/getcwd.c	2013-05-13 17:54:15 UTC (rev 4432)
@@ -93,18 +93,12 @@
       memcpy (buf, tmpbuf, len);
       return buf;
     }
-#ifdef IS_IN_rtld
-  return NULL;
-#else
   return generic_getcwd (buf, size);
-#endif
 }
 
 weak_alias (__getcwd, getcwd)
 
-#ifndef IS_IN_rtld
 /* Get the code for the generic version.  */
 #define GETCWD_RETURN_TYPE	static char * internal_function
 #define __getcwd		generic_getcwd
 #include <sysdeps/posix/getcwd.c>
-#endif




More information about the Glibc-bsd-commits mailing list