This is the mail archive of the libc-alpha@sources.redhat.com 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]

Prototypes for some malloc functions


Here is a small patch to avoid some more warnings.

2002-03-29  Wolfram Gloger  <wg@malloc.de>

	* malloc/malloc.c: Add short description and prototypes for
	malloc_get_state, malloc_set_state and posix_memalign, for
	consistency and to avoid warnings with -Wstrict-prototypes.
	Reported by Andreas Jaeger <aj@suse.de>.

--- malloc/malloc.c~	Fri Mar 29 15:53:07 2002
+++ malloc/malloc.c	Fri Mar 29 15:27:23 2002
@@ -1190,6 +1190,39 @@
 void     public_mSTATs();
 #endif
 
+/*
+  malloc_get_state(void);
+
+  Returns the state of all malloc variables in an opaque data
+  structure.
+*/
+#if __STD_C
+Void_t*  public_gET_STATe(void);
+#else
+Void_t*  public_gET_STATe();
+#endif
+
+/*
+  malloc_set_state(Void_t* state);
+
+  Restore the state of all malloc variables from data obtained with
+  malloc_get_state().
+*/
+#if __STD_C
+int      public_sET_STATe(Void_t*);
+#else
+int      public_sET_STATe();
+#endif
+
+#ifdef _LIBC
+/*
+  posix_memalign(void **memptr, size_t alignment, size_t size);
+
+  POSIX wrapper like memalign(), checking for validity of size.
+*/
+int      __posix_memalign(void **, size_t, size_t);
+#endif
+
 /* mallopt tuning options */
 
 /*


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