diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-04-22 21:56:24 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-04-23 04:44:32 +1000 |
commit | d680f769d003a19f51158a689e6039d650a3efe0 (patch) | |
tree | d1bdc7af37ec3f2118bf87cb66c8b5f4b726adf2 /libbb/git.h | |
parent | ef9b20fa7904ee5f72e3a759934560226360842d (diff) | |
download | busybox-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.h | 21 |
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 @@ | |||
1 | ssize_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 | |||
16 | static 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 | ||