aboutsummaryrefslogtreecommitdiffstats
path: root/envmemalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'envmemalloc.c')
-rw-r--r--envmemalloc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/envmemalloc.c b/envmemalloc.c
new file mode 100644
index 0000000..c500063
--- /dev/null
+++ b/envmemalloc.c
@@ -0,0 +1,29 @@
+/* See LICENSE file for copyright and license details. */
+#include "libsimple.h"
+#ifndef TEST
+
+
+void *
+libsimple_envmemalloc(int status, size_t n, va_list ap) /* TODO test (e[n][v]{mem,array}alloc) */
+{
+ void *ret;
+ int saved_errno = errno;
+ errno = 0;
+ ret = libsimple_vmemalloc(n, ap);
+ if (errno)
+ enprintf(status, "libsimple_vmemalloc:");
+ errno = saved_errno;
+ return ret;
+}
+
+
+#else
+#include "test.h"
+
+int
+main(void)
+{
+ return 0;
+}
+
+#endif