about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-10-14 21:11:09 +0000
committerUlrich Drepper <drepper@redhat.com>2005-10-14 21:11:09 +0000
commit18b8e054cf34f78f100b74b37e54673730530249 (patch)
tree9a05507b0557ed4c0b7f08549903e069d026f863
parentf9126cc23e355dcad375942312e7068b44740d6c (diff)
downloadglibc-18b8e054cf34f78f100b74b37e54673730530249.tar.gz
glibc-18b8e054cf34f78f100b74b37e54673730530249.tar.xz
glibc-18b8e054cf34f78f100b74b37e54673730530249.zip
* sysdeps/unix/opendir.c (__opendir): Pass extra argument to
	__alloc_dir.
	(__alloc_dir): Only close descriptor on error if new parameter is true.
	* sysdeps/unix/fdopendir.c (fdopendir): Pass extra argument to
	__alloc_dir.  Don't close fd on error.
	* include/dirent.h (__alloc_dir): Adjust prototype.

	* include/sys/mman.h (__mremap): Add ellipsis.
	* malloc/memusage.c: Adjust mremap wrapper for optional additional
	parameter.
-rw-r--r--ChangeLog10
-rw-r--r--include/dirent.h3
-rw-r--r--include/sys/mman.h2
-rw-r--r--localedata/locales/hu_HU28
-rw-r--r--malloc/memusage.c16
-rw-r--r--sysdeps/unix/fdopendir.c6
-rw-r--r--sysdeps/unix/opendir.c13
7 files changed, 62 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 184b52e554..9f7733caaa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2005-10-14  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/unix/opendir.c (__opendir): Pass extra argument to
+	__alloc_dir.
+	(__alloc_dir): Only close descriptor on error if new parameter is true.
+	* sysdeps/unix/fdopendir.c (fdopendir): Pass extra argument to
+	__alloc_dir.  Don't close fd on error.
+	* include/dirent.h (__alloc_dir): Adjust prototype.
+
 	* stdlib/Makefile (tests): Add tst-ucontext-off.
 	* stdlib/tst-ucontext-off.c: New file.
 	* sysdeps/unix/sysv/linux/x86_64/ucontext_i.h (TEST): Define.
@@ -36,6 +43,9 @@
 	adjust leading comment.
 	* sysdeps/unix/sysv/linux/syscalls.list: Add pointer parameter to
 	mremap syscall.
+	* include/sys/mman.h (__mremap): Add ellipsis.
+	* malloc/memusage.c: Adjust mremap wrapper for optional additional
+	parameter.
 
 2005-10-13  Ulrich Drepper  <drepper@redhat.com>
 
diff --git a/include/dirent.h b/include/dirent.h
index b040a042d3..81ad24d9dd 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -24,5 +24,6 @@ extern int __alphasort64 (const void *a, const void *b)
      __attribute_pure__;
 extern int __versionsort64 (const void *a, const void *b)
      __attribute_pure__;
-extern DIR *__alloc_dir (int fd, struct stat64 *statp) internal_function;
+extern DIR *__alloc_dir (int fd, bool close_fd, struct stat64 *statp)
+     internal_function;
 #endif
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 14e757892e..8c07a4e2c6 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -11,5 +11,5 @@ extern int __mprotect (void *__addr, size_t __len, int __prot);
 
 /* This one is Linux specific.  */
 extern void *__mremap (void *__addr, size_t __old_len,
-		       size_t __new_len, int __may_move);
+		       size_t __new_len, int __flags, ...);
 #endif
diff --git a/localedata/locales/hu_HU b/localedata/locales/hu_HU
index 00439d7323..3128cb9cc2 100644
--- a/localedata/locales/hu_HU
+++ b/localedata/locales/hu_HU
@@ -453,6 +453,33 @@ END LC_COLLATE
 
 LC_CTYPE
 copy "i18n"
+
+translit_start
+
+include "translit_combining";""
+
+<U00C1> "<U0041><U0301>";"<U0041><U00B4>";"<U0041><U0027>"
+<U00C9> "<U0045><U0301>";"<U0045><U00B4>";"<U0045><U0027>"
+<U00CD> "<U0049><U0301>";"<U0049><U00B4>";"<U0049><U0027>"
+<U00D3> "<U004F><U0301>";"<U004F><U00B4>";"<U004F><U0027>"
+<U00D6> "<U004F><U0308>";"<U004F><U00A8>";"<U004F><U003A>"
+<U0150> "<U004F><U030B>";"<U004F><U02DD>";"<U004F><U0022>"
+<U00DA> "<U0055><U0301>";"<U0055><U00B4>";"<U0055><U0027>"
+<U00DC> "<U0055><U0308>";"<U0055><U00A8>";"<U0055><U003A>"
+<U0170> "<U0055><U030B>";"<U0055><U02DD>";"<U0055><U0022>"
+
+<U00E1> "<U0061><U0301>";"<U0061><U00B4>";"<U0061><U0027>"
+<U00E9> "<U0065><U0301>";"<U0065><U00B4>";"<U0065><U0027>"
+<U00ED> "<U0069><U0301>";"<U0069><U00B4>";"<U0069><U0027>"
+<U00F3> "<U006F><U0301>";"<U006F><U00B4>";"<U006F><U0027>"
+<U00F6> "<U006F><U0308>";"<U006F><U00A8>";"<U006F><U003A>"
+<U0151> "<U006F><U030B>";"<U006F><U02DD>";"<U006F><U0022>"
+<U00FA> "<U0075><U0301>";"<U0075><U00B4>";"<U0075><U0027>"
+<U00FC> "<U0075><U0308>";"<U0075><U00A8>";"<U0075><U003A>"
+<U0171> "<U0075><U030B>";"<U0075><U02DD>";"<U0075><U0022>"
+
+translit_end
+
 END LC_CTYPE
 
 LC_MESSAGES
@@ -526,6 +553,7 @@ am_pm   "";""
 t_fmt_ampm "<U0025><U0048><U002E><U0025><U004D><U002E><U0025><U0053>"
 date_fmt "<U0025><U0059><U002E><U0020><U0025><U0062><U002E><U0020><U0025><U0065><U002E><U002C>/
 <U0020><U0025><U0041><U002C><U0020><U0025><U0048><U002E><U0025><U004D><U002E><U0025><U0053><U0020><U0025><U005A>"
+week     7;19971201;4
 END LC_TIME
 
 LC_PAPER
diff --git a/malloc/memusage.c b/malloc/memusage.c
index f586ea61ba..8b37c43a8a 100644
--- a/malloc/memusage.c
+++ b/malloc/memusage.c
@@ -24,6 +24,7 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <signal.h>
+#include <stdarg.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -44,7 +45,7 @@ static void (*freep) (void *);
 static void *(*mmapp) (void *, size_t, int, int, int, off_t);
 static void *(*mmap64p) (void *, size_t, int, int, int, off64_t);
 static int (*munmapp) (void *, size_t);
-static void *(*mremapp) (void *, size_t, size_t, int);
+static void *(*mremapp) (void *, size_t, size_t, int, void *);
 
 enum
 {
@@ -226,8 +227,8 @@ me (void)
   mmap64p =
     (void *(*) (void *, size_t, int, int, int, off64_t)) dlsym (RTLD_NEXT,
 								"mmap64");
-  mremapp = (void *(*) (void *, size_t, size_t, int)) dlsym (RTLD_NEXT,
-							     "mremap");
+  mremapp = (void *(*) (void *, size_t, size_t, int, void *)) dlsym (RTLD_NEXT,
+								     "mremap");
   munmapp = (int (*) (void *, size_t)) dlsym (RTLD_NEXT, "munmap");
   initialized = 1;
 
@@ -649,9 +650,14 @@ mmap64 (void *start, size_t len, int prot, int flags, int fd, off64_t offset)
 /* `mmap' replacement.  We do not have to keep track of the sizesince
    `munmap' will get it as a parameter.  */
 void *
-mremap (void *start, size_t old_len, size_t len, int flags)
+mremap (void *start, size_t old_len, size_t len, int flags,  ...)
 {
   void *result = NULL;
+  va_list ap;
+
+  va_start (ap, flags);
+  void *newaddr = (flags & MREMAP_FIXED) ? va_arg (ap, void *) : NULL;
+  va_end (ap);
 
   /* Determine real implementation if not already happened.  */
   if (__builtin_expect (initialized <= 0, 0))
@@ -662,7 +668,7 @@ mremap (void *start, size_t old_len, size_t len, int flags)
     }
 
   /* Always get a block.  We don't need extra memory.  */
-  result = (*mremapp) (start, old_len, len, flags);
+  result = (*mremapp) (start, old_len, len, flags, newaddr);
 
   if (!not_me && trace_mmap)
     {
diff --git a/sysdeps/unix/fdopendir.c b/sysdeps/unix/fdopendir.c
index 3c481fcf0d..ef6c97c308 100644
--- a/sysdeps/unix/fdopendir.c
+++ b/sysdeps/unix/fdopendir.c
@@ -29,14 +29,12 @@ fdopendir (int fd)
   struct stat64 statbuf;
 
   if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0)
-    goto out;
+    return NULL;
   if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0))
     {
       __set_errno (ENOTDIR);
-    out:
-      close_not_cancel_no_status (fd);
       return NULL;
     }
 
-  return __alloc_dir (fd, &statbuf);
+  return __alloc_dir (fd, false, &statbuf);
 }
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 366670b79c..98fb4ca5c8 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -132,14 +132,14 @@ __opendir (const char *name)
 	}
     }
 
-  return __alloc_dir (fd, &statbuf);
+  return __alloc_dir (fd, true, &statbuf);
 }
 weak_alias (__opendir, opendir)
 
 
 DIR *
 internal_function
-__alloc_dir (int fd, struct stat64 *statp)
+__alloc_dir (int fd, bool close_fd, struct stat64 *statp)
 {
   if (__builtin_expect (__fcntl (fd, F_SETFD, FD_CLOEXEC), 0) < 0)
     goto lose;
@@ -160,9 +160,12 @@ __alloc_dir (int fd, struct stat64 *statp)
   if (dirp == NULL)
   lose:
     {
-      int save_errno = errno;
-      close_not_cancel_no_status (fd);
-      __set_errno (save_errno);
+      if (close_fd)
+	{
+	  int save_errno = errno;
+	  close_not_cancel_no_status (fd);
+	  __set_errno (save_errno);
+	}
       return NULL;
     }
   memset (dirp, '\0', sizeof (DIR));