diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-07 16:24:46 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-07 16:24:46 +0000 |
commit | 5625415085e68ac5e150f54e685417c866620d76 (patch) | |
tree | 4146667d4080f97bc39ac96d844c01a8956aeeca /include | |
parent | 890ac9deb2cc57cadd7aba4ee91bd012e19e239d (diff) | |
download | busybox-w32-5625415085e68ac5e150f54e685417c866620d76.tar.gz busybox-w32-5625415085e68ac5e150f54e685417c866620d76.tar.bz2 busybox-w32-5625415085e68ac5e150f54e685417c866620d76.zip |
dd: make it recognize not only 'k' but 'K' too;
make it (partially) CONFIG_LFS-aware
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 84c8af4b6..11e1e62d9 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -61,6 +61,31 @@ | |||
61 | #define PATH_MAX 256 | 61 | #define PATH_MAX 256 |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | /* Large file support */ | ||
65 | #ifdef CONFIG_LFS | ||
66 | # define FILEOFF_TYPE off64_t | ||
67 | # define FILEOFF_FMT "%lld" | ||
68 | # define LSEEK lseek64 | ||
69 | # define STAT stat64 | ||
70 | # define LSTAT lstat64 | ||
71 | # define STRUCT_STAT struct stat64 | ||
72 | # define STRTOOFF strtoll | ||
73 | # define SAFE_STRTOOFF safe_strtoll | ||
74 | #else | ||
75 | # define FILEOFF_TYPE off_t | ||
76 | # define FILEOFF_FMT "%ld" | ||
77 | # define LSEEK lseek | ||
78 | # define STAT stat | ||
79 | # define LSTAT lstat | ||
80 | # define STRUCT_STAT struct stat | ||
81 | # define STRTOOFF strtol | ||
82 | # define SAFE_STRTOOFF safe_strtol | ||
83 | /* Do we need to undefine O_LARGEFILE? */ | ||
84 | #endif | ||
85 | /* scary. better ideas? (but do *test* them first!) */ | ||
86 | #define MAX_FILEOFF_TYPE \ | ||
87 | ((FILEOFF_TYPE)~((FILEOFF_TYPE)1 << (sizeof(FILEOFF_TYPE)*8-1))) | ||
88 | |||
64 | /* Some useful definitions */ | 89 | /* Some useful definitions */ |
65 | #undef FALSE | 90 | #undef FALSE |
66 | #define FALSE ((int) 0) | 91 | #define FALSE ((int) 0) |