Index: trunk/Nebulous/nebclient/src/xmalloc.h
===================================================================
--- trunk/Nebulous/nebclient/src/xmalloc.h	(revision 4677)
+++ trunk/Nebulous/nebclient/src/xmalloc.h	(revision 19553)
@@ -4,5 +4,5 @@
  * Copyright (C) 2003-2005  Joshua Hoblitt, 2003  Robert Lupton
  *
- * $Id: xmalloc.h,v 1.4 2005-07-30 02:45:31 jhoblitt Exp $
+ * $Id: xmalloc.h,v 1.5 2008-09-15 21:24:30 jhoblitt Exp $
  */
 
@@ -10,9 +10,43 @@
 #define XMALLOC_H 1
 
-void * xmalloc(size_t n);
+#define xmalloc(size) \
+x_xmalloc(__FILE__, __LINE__, __func__, size)
 
-void * xrealloc(void *ptr, size_t size);
+void * x_xmalloc(
+    const char *file,                  ///< File of caller
+    unsigned int lineno,               ///< Line number of caller
+    const char *func,                  ///< Function name of caller
+    size_t n
+#ifdef __GNUC__
+) __attribute__((malloc));
+# else // ifdef __GNUC__
+);
+#endif // ifdef __GNUC__
+
+
+#define xrealloc(ptr, size) \
+x_xrealloc(__FILE__, __LINE__, __func__, ptr, size)
+
+void * x_xrealloc(
+    const char *file,                  ///< File of caller
+    unsigned int lineno,               ///< Line number of caller
+    const char *func,                  ///< Function name of caller
+    void *ptr,
+    size_t size
+#ifdef __GNUC__
+) __attribute__((malloc));
+# else // ifdef __GNUC__
+);
+#endif // ifdef __GNUC__
  
-void xfree(void *ptr);
+#define xfree(ptr) \
+x_xfree(__FILE__, __LINE__, __func__, ptr)
+
+void x_xfree(
+    const char *file,                  ///< File of caller
+    unsigned int lineno,               ///< Line number of caller
+    const char *func,                  ///< Function name of caller
+    void *ptr
+);
 
 #endif // XMALLOC_H
