This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-54-g375607b


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  375607b9cc9ddf46a379bab6bf2998c54099d6b5 (commit)
      from  a9708fed779ff4e61e07ec2eae78e5c0753e1222 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=375607b9cc9ddf46a379bab6bf2998c54099d6b5

commit 375607b9cc9ddf46a379bab6bf2998c54099d6b5
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jan 7 15:00:47 2013 +0000

    Clean up __MALLOC_* macros.

diff --git a/ChangeLog b/ChangeLog
index b5be823..1d0ff3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2013-01-07  Joseph Myers  <joseph@codesourcery.com>
 
+	* malloc/malloc.h (__MALLOC_P): Remove all definitions.
+	(__MALLOC_PMT): Likewise.
+	[__GNUC__] (__MALLOC_HOOK_VOLATILE): Make not conditional on
+	[__GNUC__], only on [_LIBC].
+	[__GNUC__] (__MALLOC_DEPRECATED): Likewise.
+	[!__GNUC__] (__MALLOC_HOOK_VOLATILE): Remove definition.
+	[!__GNUC__] (__MALLOC_DEPRECATED): Likewise.
+	* malloc/malloc.c (malloc_hook_ini): Do not use __MALLOC_P in
+	forward declaration.
+	(realloc_hook_ini): Likewise.
+	(memalign_hook_ini): Likewise.
+	(__libc_memalign): Do not use __MALLOC_PMT in variable
+	declaration.
+	(__libc_valloc): Likewise.
+	(__libc_pvalloc): Likewise.
+	(__libc_calloc): Likewise.
+	(__posix_memalign): Likewise.
+
 	[BZ #14996]
 	* math/s_casinh.c: Include <float.h>.
 	(__casinh): Do not do computation with squaring and square root
diff --git a/malloc/malloc.c b/malloc/malloc.c
index f1f672b..9188d4e 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1844,12 +1844,12 @@ static void     malloc_consolidate(mstate);
 #endif
 
 /* Forward declarations.  */
-static void* malloc_hook_ini __MALLOC_P ((size_t sz,
-					    const __malloc_ptr_t caller));
-static void* realloc_hook_ini __MALLOC_P ((void* ptr, size_t sz,
-					     const __malloc_ptr_t caller));
-static void* memalign_hook_ini __MALLOC_P ((size_t alignment, size_t sz,
-					      const __malloc_ptr_t caller));
+static void* malloc_hook_ini (size_t sz,
+			      const __malloc_ptr_t caller) __THROW;
+static void* realloc_hook_ini (void* ptr, size_t sz,
+			       const __malloc_ptr_t caller) __THROW;
+static void* memalign_hook_ini (size_t alignment, size_t sz,
+				const __malloc_ptr_t caller) __THROW;
 
 void weak_variable (*__malloc_initialize_hook) (void) = NULL;
 void weak_variable (*__free_hook) (__malloc_ptr_t __ptr,
@@ -3008,8 +3008,7 @@ __libc_memalign(size_t alignment, size_t bytes)
   mstate ar_ptr;
   void *p;
 
-  __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					const __malloc_ptr_t)) =
+  __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(alignment, bytes, RETURN_ADDRESS (0));
@@ -3051,8 +3050,7 @@ __libc_valloc(size_t bytes)
 
   size_t pagesz = GLRO(dl_pagesize);
 
-  __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					const __malloc_ptr_t)) =
+  __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(pagesz, bytes, RETURN_ADDRESS (0));
@@ -3088,8 +3086,7 @@ __libc_pvalloc(size_t bytes)
   size_t page_mask = GLRO(dl_pagesize) - 1;
   size_t rounded_bytes = (bytes + page_mask) & ~(page_mask);
 
-  __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					const __malloc_ptr_t)) =
+  __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     return (*hook)(pagesz, rounded_bytes, RETURN_ADDRESS (0));
@@ -3132,7 +3129,7 @@ __libc_calloc(size_t n, size_t elem_size)
     }
   }
 
-  __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, const __malloc_ptr_t)) =
+  __malloc_ptr_t (*hook) (size_t, const __malloc_ptr_t) =
     force_reg (__malloc_hook);
   if (__builtin_expect (hook != NULL, 0)) {
     sz = bytes;
@@ -4923,8 +4920,7 @@ __posix_memalign (void **memptr, size_t alignment, size_t size)
 
   /* Call the hook here, so that caller is posix_memalign's caller
      and not posix_memalign itself.  */
-  __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
-					const __malloc_ptr_t)) =
+  __malloc_ptr_t (*hook) (size_t, size_t, const __malloc_ptr_t) =
     force_reg (__memalign_hook);
   if (__builtin_expect (hook != NULL, 0))
     mem = (*hook)(alignment, size, RETURN_ADDRESS (0));
diff --git a/malloc/malloc.h b/malloc/malloc.h
index 7c8720b..9fe7ab2 100644
--- a/malloc/malloc.h
+++ b/malloc/malloc.h
@@ -28,29 +28,13 @@
 #define __malloc_size_t size_t
 #define __malloc_ptrdiff_t ptrdiff_t
 
-#ifdef __GNUC__
-
-# define __MALLOC_P(args)	args __THROW
-/* This macro will be used for functions which might take C++ callback
-   functions.  */
-# define __MALLOC_PMT(args)	args
-
-# ifdef _LIBC
-#  define __MALLOC_HOOK_VOLATILE
-#  define __MALLOC_DEPRECATED
-# else
-#  define __MALLOC_HOOK_VOLATILE volatile
-#  define __MALLOC_DEPRECATED __attribute_deprecated__
-# endif
-
-#else	/* Not GCC.  */
-
-# define __MALLOC_P(args)	args
-# define __MALLOC_PMT(args)	args
+#ifdef _LIBC
 # define __MALLOC_HOOK_VOLATILE
+# define __MALLOC_DEPRECATED
+#else
+# define __MALLOC_HOOK_VOLATILE volatile
 # define __MALLOC_DEPRECATED __attribute_deprecated__
-
-#endif	/* GCC.  */
+#endif
 
 
 __BEGIN_DECLS

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |   18 ++++++++++++++++++
 malloc/malloc.c |   26 +++++++++++---------------
 malloc/malloc.h |   26 +++++---------------------
 3 files changed, 34 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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