search for: off_t

Displaying 20 results from an estimated 731 matches for "off_t".

2007 Mar 29
2
Nasty looking warnings on Debian Etch AMD64 bit box
...Debian Etch gives the following list of nasty looking warnings, anyone running successfully on 64 bit linux? Building native extensions. This could take a while... fs_store.c: In function ?fso_seek_i?: fs_store.c:238: warning: format ?%lld? expects type ?long long int?, but argument 4 has type ?off_t? fs_store.c:238: warning: format ?%lld? expects type ?long long int?, but argument 4 has type ?off_t? fs_store.c: In function ?fsi_seek_i?: fs_store.c:292: warning: format ?%lld? expects type ?long long int?, but argument 4 has type ?off_t? fs_store.c:292: warning: format ?%lld? expects type ?long...
2020 May 25
0
[PATCH] Make len parameter of do_punch_hole OFF_T
The argument passed to do_punch_hole is a OFF_T to beginning with, and otherwise holes bigger than 2G will cause rsync to fail. --- syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syscall.c b/syscall.c index e1a02a3c..e8ce7d5c 100644 --- a/syscall.c +++ b/syscall.c @@ -523,7 +523,7 @@ OFF_T do_fallocate(int fd, OFF...
2016 Jan 06
0
[klibc:master] Add pread and pwrite 32bit syscall wrappers for parisc
...sr/klibc/SYSCALLS.def index 41cfa17..c56e8f9 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -189,8 +189,10 @@ int fdatasync,fsync::fdatasync(int); int readv(int, const struct iovec *, int); int writev(int, const struct iovec *, int); int ftruncate64,ftruncate::ftruncate(int, off_t); -ssize_t pread64,pread::pread(int, void *, size_t, off_t); -ssize_t pwrite64,pwrite::pwrite(int, void *, size_t, off_t); +<parisc> ssize_t pread64,pread::__pread(int, void *, size_t, off_t); +<parisc> ssize_t pwrite64,pwrite::__pwrite(int, void *, size_t, off_t); +<!parisc> ssiz...
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
...ion and compression options impact rsync throughput -- and to be sure I'm using the right options to provide optimal throughput.] --- rsync-2.4.6/util.c.rik Tue Sep 5 22:46:43 2000 +++ rsync-2.4.6/util.c Fri Oct 5 09:19:35 2001 @@ -835,28 +835,70 @@ return (int)*s1 - (int)*s2; } -static OFF_T last_ofs; +static OFF_T last_ofs; +static struct timeval print_time; +static struct timeval start_time; +static OFF_T start_ofs; + +static unsigned long msdiff(struct timeval *t1, struct timeval *t2) +{ + return (t2->tv_sec - t1->tv_sec) * 1000 + + (t2->tv_usec - t1->tv_usec...
2013 Mar 05
3
2GB limit patch
...http://lists.xiph.org/pipermail/flac-dev/2007-September/002423.html > > The fix would be to use _ftelli64 instead of ftell with Visual Studio. > http://msdn.microsoft.com/en-us/library/0ys3hc0b%28v=vs.110%29.aspx That's not enough. At least, the followings are also needed. 1. Change off_t to something else. off_t can lead to ABI issue when used in public API, since it's definition can change even on the same system (by setting _FILE_OFFSET_BITS or something), and is always 32bit on mingw, mingw-w64 and MSVC. Since FLAC even takes the trouble of casting seek offset to off_t wh...
2023 Mar 22
1
Large file support, mkstemp, and off_t
We are trying to enable large file support for everything built for ARM on ChromeOS and openssh uses mkstemp which has a 64-bit version for compatibility with open64. When looking into enabling the large file support flags, I noticed: `void start_progress_meter(const char *, off_t, off_t *);` in progressmeter.h which would have different ABIs with and without large file support. You all probably ought to avoid exposing off_t in any external-facing APIs. Allen
2023 Mar 22
1
Large file support, mkstemp, and off_t
...e trying to enable large file support for everything built for > ARM on ChromeOS and openssh uses mkstemp which has a 64-bit version > for compatibility with open64. When looking into enabling the large > file support flags, I noticed: > > `void start_progress_meter(const char *, off_t, off_t *);` > > in progressmeter.h which would have different ABIs with and without > large file support. You all probably ought to avoid exposing off_t in > any external-facing APIs. OpenSSH doesn't have any external-facing APIs though, we don't ship a library for others to u...
2001 Sep 26
2
openssh-2.9.9p2 session.c fails on Solaris 7,8 w/ SunPro C
FYI-- session.c fails from openSSH 2.9.9p2 with SunPro C compiler on Solaris 7, 8. The function do_pre_login had to be moved to before its use in do_exec_pty (a predeclaration would work). It does appear to work correctly, given the above fix. Still having the largefile problem (argh), so if anyone can help with /that/ ... -- Austin David -- Sr. Systems Architect Wink Communications
2005 Nov 21
1
[PATCH] 64 bit clean compilation patches
...he OS. These patches remove the following warnings found during a 64-bit compile: hostfile.c: In function `extract_salt': hostfile.c:92: warning: unsigned int format, different type arg (arg 2) progressmeter.c: In function `format_rate': progressmeter.c:91: warning: long long int format, off_t arg (arg 4) progressmeter.c:91: warning: long long int format, off_t arg (arg 5) progressmeter.c:91: warning: long long int format, off_t arg (arg 4) progressmeter.c:91: warning: long long int format, off_t arg (arg 5) progressmeter.c: In function `format_size': progressmeter.c:104: warning: lo...
2010 Jun 15
3
about rsyncing of block devices
...r devices. + * If so, try to determine the actual device size. */ + if (IS_DEVICE(sx.st.st_mode) && sx.st.st_size == 0) { + int fd; + + fd = open(fname, O_RDONLY); + + if (fd < 0) + rsyserr(FERROR, errno, "failed to open %s to determine size", fname); + else { + OFF_T off = lseek(fd, 0, SEEK_END); + if (off == (OFF_T) -1) + rsyserr(FERROR, errno, "failed to seek to end of %s to determine size", fname); + else { + sx.st.st_size = off; + } + close(fd); + } + } + if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file)) { #if...
2014 Jun 22
0
[PATCH 5/6] utils/isohybrid.c: Change all fseek(3) to fseeko(3)
It seems unwise to offer future programmers fseek(3) calls for copy+paste. They are simply insufficient for large image files. This change switches all calls of fseek(3) to fseeko(3) and takes care that the offset value if of type off_t. --- utils/isohybrid.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/utils/isohybrid.c b/utils/isohybrid.c index 1c8f0b6..072402f 100644 --- a/utils/isohybrid.c +++ b/utils/isohybrid.c @@ -916,13 +916,13 @@ main(int argc, char *argv[]) if (!(fp = fop...
2007 Nov 09
1
Patch for progressmeter.c
...--- ../openssh-4.7p1.logging_features/progressmeter.c 2006-08-04 22:39:40.000000000 -0400 +++ progressmeter.c 2007-10-22 13:19:11.000000000 -0400 @@ -68,7 +68,9 @@ static time_t last_update; /* last progr static char *file; /* name of the file being transferred */ static off_t end_pos; /* ending position of transfer */ static off_t cur_pos; /* transfer position as of last refresh */ -static volatile off_t *counter; /* progress counter */ +static off_t last_pos; +static off_t max_delta_pos = 0; +static volatile off_t *counter; /* progress counte...
2002 Feb 06
2
SFTP Status Bar..
...UT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +int +getttywidth(void) +{ + struct winsize winsize; + + if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1) + return (winsize.ws_col ? winsize.ws_col : 80); + else + return (80); +} + +void +progressmeter(off_t statbytes, off_t totalbytes, char *filename) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static char *progressbar = NULL; + static struct timeval *start = NULL, lastupdate; + static off_t lastsi...
2010 Jul 04
5
dovecot-1.2.12 fails to build on Solaris 8 and 10
configure fails with : configure: error: Unsupported off_t type I am not too sure what off_t is needed but this is a pretty standard thing. My configure line : ./configure --build=i386-pc-solaris2.10 --host=i386-pc-solaris2.10 --prefix=/opt/csw --with-zlib --with-ssl=openssl --with-storages=mbox,maildir --with-libiconv-prefix=/opt/csw Yes, the openssl...
2004 Jun 07
1
klibc-0.124 released with 64-bit off_t and struct statfs64
It's checked in, it seems to work, it didn't bloat the system significantly, but it makes life a lot easier... I just released klibc-0.124 with the 64-bit off_t and statfs64 changes. The API shouldn't have changed, but the ABI is now 64 bits in (hopefully) all the right places. It's probably buggy... beat me up or (better) send a patch... -hpa
2016 Jan 06
5
[PATCH klibc 0/5] klibc architecture fixes
Here's an assortment of build and run-time fixes for various architectures that we've applied in Debian. Ben. Aurelien Jarno (1): ppc64: fix struct stat Ben Hutchings (2): MIPS: Update archfcntl.h syscalls: Override detection of direct socket syscalls on i386, m68k, s390 Helge Deller (1): Add pread and pwrite 32bit syscall wrappers for parisc Mauricio Faria de Oliveira
2002 Aug 05
5
[patch] read-devices
...len - i > 0) { + if (len - i > 0) { /* make this ">=" to address http://lists.samba.org/pipermail/rsync/2002-August/008011.html */ mdfour_update(&m, (uchar *)(buf1+i), (len-i)); } mdfour_result(&m, (uchar *)sum); } -void file_checksum(char *fname,char *sum,OFF_T size) +void file_checksum(char *fname,char *sum) { - OFF_T i; + OFF_T i = 0; struct map_struct *buf; int fd; - OFF_T len = size; char tmpchunk[CSUM_CHUNK]; struct mdfour m; memset(sum,0,MD4_SUM_LENGTH); fd = do_open(fname, O_RDONLY, 0); if (fd == -1) return; - buf = map_file...
2017 Jan 11
2
Broken OS after upgrade
...ut what is broken. During configure, it fails with: checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... unknown checking for _LARGE_FILES value needed for large files... unknown checking for _Bool... yes checking for uoff_t... no checking type of off_t... unknown configure: error: Unsupported off_t type -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft."
2013 Mar 05
0
2GB limit patch
...il/flac-dev/2007-September/002423.html >> >> The fix would be to use _ftelli64 instead of ftell with Visual Studio. >> http://msdn.microsoft.com/en-us/library/0ys3hc0b%28v=vs.110%29.aspx > > That's not enough. At least, the followings are also needed. > > 1. Change off_t to something else. off_t can lead to ABI issue when used > in public API, since it's definition can change even on the same system > (by setting _FILE_OFFSET_BITS or something), and is always 32bit on > mingw, mingw-w64 and MSVC. > Since FLAC even takes the trouble of casting seek o...
2012 May 21
0
[klibc:master] lseek: give gcc a little optimization hint
...--- usr/klibc/lseek.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/klibc/lseek.c b/usr/klibc/lseek.c index a313bed..f262d19 100644 --- a/usr/klibc/lseek.c +++ b/usr/klibc/lseek.c @@ -18,13 +18,14 @@ extern int __llseek(int fd, unsigned long hi, unsigned long lo, off_t * res, off_t lseek(int fd, off_t offset, int whence) { + unsigned long long ullo = offset; off_t result; int rv; - rv = __llseek(fd, (unsigned long)(offset >> 32), (unsigned long)offset, + rv = __llseek(fd, (unsigned long)(ullo >> 32), (unsigned long)ullo, &result...