Rename para_chdir() and make it an inline function.
[osl.git] / log.h
diff --git a/log.h b/log.h
index d78b48a45b5b97b64ad38f0e913bdec888f91d67..8c648f4ddf65a435a27b211983abfeb55abcf922 100644 (file)
--- a/log.h
+++ b/log.h
@@ -23,9 +23,6 @@
 #include <assert.h>
 #include "gcc-compat.h"
 
-/** compute the maximum of \a a and \a b */
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-
 /** debug loglevel, gets really noisy */
 #define DEBUG 1
 /** still noisy, but won't fill your disk */
 /** \endcond */
 
 __printf_2_3 void __log(int, const char*, ...);
-
-/**
- * Write a log message to a dynamically allocated string.
- *
- * \param fmt Usual format string.
- * \param p Result pointer.
- *
- * \sa printf(3). */
-#define VSPRINTF(fmt, p) \
-{ \
-       int n; \
-       size_t size = 100; \
-       p = para_malloc(size); \
-       while (1) { \
-               va_list ap; \
-               /* Try to print in the allocated space. */ \
-               va_start(ap, fmt); \
-               n = vsnprintf(p, size, fmt, ap); \
-               va_end(ap); \
-               /* If that worked, return the string. */ \
-               if (n > -1 && n < size) \
-                       break; \
-               /* Else try again with more space. */ \
-               if (n > -1) /* glibc 2.1 */ \
-                       size = n + 1; /* precisely what is needed */ \
-               else /* glibc 2.0 */ \
-                       size *= 2; /* twice the old size */ \
-               p = realloc(p, size); \
-               if (!p) \
-                       break; \
-       } \
-}