diff options
author | Denis Vlasenko | 2006-10-07 16:24:46 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-07 16:24:46 +0000 |
commit | 5625415085e68ac5e150f54e685417c866620d76 (patch) | |
tree | 4146667d4080f97bc39ac96d844c01a8956aeeca /include/libbb.h | |
parent | 890ac9deb2cc57cadd7aba4ee91bd012e19e239d (diff) | |
download | busybox-5625415085e68ac5e150f54e685417c866620d76.zip busybox-5625415085e68ac5e150f54e685417c866620d76.tar.gz |
dd: make it recognize not only 'k' but 'K' too;
make it (partially) CONFIG_LFS-aware
Diffstat (limited to 'include/libbb.h')
-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 84c8af4..11e1e62 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -61,6 +61,31 @@ #define PATH_MAX 256 #endif +/* Large file support */ +#ifdef CONFIG_LFS +# define FILEOFF_TYPE off64_t +# define FILEOFF_FMT "%lld" +# define LSEEK lseek64 +# define STAT stat64 +# define LSTAT lstat64 +# define STRUCT_STAT struct stat64 +# define STRTOOFF strtoll +# define SAFE_STRTOOFF safe_strtoll +#else +# define FILEOFF_TYPE off_t +# define FILEOFF_FMT "%ld" +# define LSEEK lseek +# define STAT stat +# define LSTAT lstat +# define STRUCT_STAT struct stat +# define STRTOOFF strtol +# define SAFE_STRTOOFF safe_strtol +/* Do we need to undefine O_LARGEFILE? */ +#endif +/* scary. better ideas? (but do *test* them first!) */ +#define MAX_FILEOFF_TYPE \ + ((FILEOFF_TYPE)~((FILEOFF_TYPE)1 << (sizeof(FILEOFF_TYPE)*8-1))) + /* Some useful definitions */ #undef FALSE #define FALSE ((int) 0) |