summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2011-09-14 02:05:54 +0200
committerGravatar Martin Szulecki2012-03-19 01:43:16 +0100
commitabf7eaa91e2ece0f461c71d3dcc0b2900c199209 (patch)
tree4736105aac67d1c3194880cf19c21bb57b2822d4 /src
parent2c1eefbba3cc746ad593210097e64854a0f97464 (diff)
downloadlibimobiledevice-abf7eaa91e2ece0f461c71d3dcc0b2900c199209.tar.gz
libimobiledevice-abf7eaa91e2ece0f461c71d3dcc0b2900c199209.tar.bz2
Remove asprintf.h from src/
Diffstat (limited to 'src')
-rw-r--r--src/asprintf.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/asprintf.h b/src/asprintf.h
deleted file mode 100644
index 3b0072e..0000000
--- a/src/asprintf.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef ASPRINTF_H
2#define ASPRINTF_H
3
4#ifdef HAVE_CONFIG_H
5#include <config.h>
6#endif
7
8#ifndef HAVE_VASPRINTF
9static inline int vasprintf(char **PTR, const char *TEMPLATE, va_list AP)
10{
11 int res;
12 res = vsnprintf(NULL, 32768, TEMPLATE, AP);
13 if (res > 0) {
14 *PTR = (char*)malloc(res+1);
15 res = vsnprintf(*PTR, res, TEMPLATE, AP);
16 }
17 return res;
18}
19#endif
20
21#ifndef HAVE_ASPRINTF
22static inline int asprintf(char **PTR, const char *TEMPLATE, ...)
23{
24 int res;
25 va_list AP;
26 va_start(AP, TEMPLATE);
27 res = vasprintf(PTR, TEMPLATE, AP);
28 va_end(AP);
29 return res;
30}
31#endif
32
33#endif /* ASPRINTF_H */