aboutsummaryrefslogtreecommitdiff
path: root/libbb/git.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-22 21:56:24 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-23 04:44:32 +1000
commitd680f769d003a19f51158a689e6039d650a3efe0 (patch)
treed1bdc7af37ec3f2118bf87cb66c8b5f4b726adf2 /libbb/git.h
parentef9b20fa7904ee5f72e3a759934560226360842d (diff)
downloadbusybox-w32-d680f769d003a19f51158a689e6039d650a3efe0.tar.gz
busybox-w32-d680f769d003a19f51158a689e6039d650a3efe0.tar.bz2
busybox-w32-d680f769d003a19f51158a689e6039d650a3efe0.zip
update imported git files to adapt to new environment
Diffstat (limited to 'libbb/git.h')
-rw-r--r--libbb/git.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/libbb/git.h b/libbb/git.h
new file mode 100644
index 000000000..3274af34d
--- /dev/null
+++ b/libbb/git.h
@@ -0,0 +1,21 @@
1ssize_t write_in_full(int fd, const void *buf, size_t count);
2
3#define alloc_nr(x) (((x)+16)*3/2)
4
5#define ALLOC_GROW(x, nr, alloc) \
6 do { \
7 if ((nr) > alloc) { \
8 if (alloc_nr(alloc) < (nr)) \
9 alloc = (nr); \
10 else \
11 alloc = alloc_nr(alloc); \
12 x = xrealloc((x), alloc * sizeof(*(x))); \
13 } \
14 } while(0)
15
16static inline int is_absolute_path(const char *path)
17{
18 return path[0] == '/' || has_dos_drive_prefix(path);
19}
20
21#define NORETURN ATTRIBUTE_NORETURN