about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--include/stdlib.h2
-rw-r--r--malloc/Versions3
-rw-r--r--stdlib/stdlib.h5
4 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fed464e4ab..aa72ed58fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-04-14  Ulrich Drepper  <drepper@redhat.com>
+
+	* malloc/Versions [libc] (GLIBC_2.2): Add posix_memalign.
+	* malloc/malloc.c: Implement posix_memalign for glibc.
+	* include/stdlib.h: Add prototype for __posix_memalign.
+	* stdlib/stdlib.h: Add prototype for posix_memalign.
+
 2000-04-14  Andreas Jaeger  <aj@suse.de>
 
 	* sysdeps/generic/madvise.c: Fix typos.
diff --git a/include/stdlib.h b/include/stdlib.h
index edca2009e0..1bd7904672 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -55,6 +55,8 @@ extern void _quicksort (void *const pbase, size_t total_elems,
 
 extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
 
+extern int __posix_memalign (void **memptr, size_t alignment, size_t size);
+
 #endif
 #undef __Need_M_And_C
 
diff --git a/malloc/Versions b/malloc/Versions
index 759a0636c1..98be892b48 100644
--- a/malloc/Versions
+++ b/malloc/Versions
@@ -51,5 +51,8 @@ libc {
   GLIBC_2.2 {
     # m*
     mcheck_check_all; mcheck_pedantic;
+
+    # p*
+    posix_memalign;
   }
 }
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 604ab64f78..8401e5d64a 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -549,6 +549,11 @@ extern void cfree (void *__ptr) __THROW;
 extern void *valloc (size_t __size) __THROW __attribute_malloc__;
 #endif
 
+#ifdef __USE_XOPEN2K
+/* Allocate memiry of SIZE bytes with an alignment of ALIGNMENT.  */
+extern int posix_memalign (void **memptr, size_t alignment, size_t size)
+     __THROW;
+#endif
 
 /* Abort execution and generate a core-dump.  */
 extern void abort (void) __THROW __attribute__ ((__noreturn__));