search for: fseeko

Displaying 20 results from an estimated 197 matches for "fseeko".

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 +9...
2014 Jun 22
16
Announcing a patch series for isohybrid.c
Hi, following will be 6 patch proposals for isohybrid.c 1: Encode GPT partition names as UTF-16LE 2: Correct blocking factor in APM partition block counts 3: Correct end block address of first GPT partition 4: Write GPT backup to the very end of the image 5: Change all fseek(3) to fseeko(3) 6: Introduce option --mbr and make isohybrid.c compilable standalone If the form needs adjustments, i whould be able to reproduce the patches. The state after patch 6 was tested by re-hybdridization of yetserday's Fedora-Live-Desktop-x86_64-20-1.iso. The result was loaded by xorriso whic...
2014 May 13
2
[PATCH] isohybrid: fix overflow on 32 bit system
On 2014?05?12? 22:38, H. Peter Anvin wrote: > That is because it needs to use fseeko() and use off_t. Do you mean it does need a patch for isohybrid.c. And the patch looks like: #if _FILE_OFFSET_BITS == 64 fseeko(...) #else fseek(...) Regards, Kai > > On May 11, 2014 11:53:17 PM PDT, Kang Kai <Kai.Kang at windriver.com> wrote: >> On 2014?05?12? 10:49...
2013 Mar 06
2
Updated MSVC patch
Those checks account for compiler changes/improvements introduced in Visual Studio 2010 that are not present in Visual Studio 2008. I will grab Visual Studio 2012 off of MSDN and make sure everything is OK there. -Ben > Hi Ben, > > Can you please remove the _MSC_VER >= 1600 check? > > _MSC_VER 1600 is set for Visual Studio 2010, which means > that Visual Studio 2012 will
2014 Jun 20
3
[PATCH] isohybrid: fix overflow on 32 bit system
...#39;-u', it overflows on a 32 bits host. It seeks to 512 bytes before the end of the image to install gpt header. If the size of image is larger than LONG_MAX, it overflows fseek() and cause error: isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument Replace fseek with fseeko to fix this issue. Signed-off-by: Kai Kang <kai.kang at windriver.com> --- utils/isohybrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/isohybrid.c b/utils/isohybrid.c index 410bb60..23fc6c0 100644 --- a/utils/isohybrid.c +++ b/utils/isohybrid.c @@ -1126,7 +11...
2014 May 12
2
[PATCH] isohybrid: fix overflow on 32 bit system
...8: Invalid argument >> >> Check the offset and call fseek() multi-times if offset is too large. >> >> Signed-off-by: Kai Kang <kai.kang at windriver.com> > NAK. > > The right thing to do is compile it with #define _FILE_OFFSET_BITS 64 > and change fseek to fseeko with the appropriate type being off_t. > > -hpa Hi hpa, Thanks for your reply. In utils/Makefile, -D_FILE_OFFSET_BITS=64 is added to CFLAGS. isohybrid is compiled with -D_FILE_OFFSET_BITS=64 but it still fails to handle the large offset. make[3]: Entering directory `/home/neil/wrlinux...
2012 Dec 27
1
[patch] patch for fskip_ahead()
Hi, This patch addresses the following issue: [Problem] MinGW build of flac command fails to parse piped WAV input with WAVEFORMATEXTENSIBLE format. [Description] This is because MinGW fseeko() doesn't return error for the attempt to seek on non seekable file (same behavior as MSVC). The simplest solution would be to change #ifdef _MSC_VER to #ifdef _WIN32 here. Instead, this patch tests file with fstat(), and use fseeko() only when it is a regular file. This is confirmed to work pr...
2014 Jun 22
1
[PATCH] utils/isohybrid.c: usage text change, s/AFP/APM/
Hi, Geert Stappers > You will see the recent commits, including the 'fseek' to 'fseeko' change. I was looking at http://git.kernel.org/cgit/boot/syslinux/syslinux.git which is what Google brings up on "syslinux git" and looks quite official. Now i wonder about +#define _FILE_OFFSET_BITS 64 after it was already done in Makefile some time earlier. Luckily, elsewis...
2014 Jun 22
0
isohybrid has 2 variants
...tp://www.syslinux.org/archives/2014-June/022259.html me: > > Already reported in may and diagnosed by hpa: > > http://www.syslinux.org/archives/2014-May/022041.html: > > > The right thing to do is compile it with #define _FILE_OFFSET_BITS 64 > > > and change fseek to fseeko with the appropriate type being off_t. Ady: > This has been already applied in the Syslinux git (zytor repo). The replacement of fseek(3) by fseeko(3) has not happened. Only the sizeof(off_t) has been forced to 64 bit on 32 bit systems in Makefile by CFLAGS = ... -D_FILE_OFFSET_BITS=64 .....
2013 Mar 05
3
2GB limit patch
...g 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 when calling fseeko(), it gets truncated to 32bit on Win32 even if you use _fseeki64(). This change results in ABI break, but luckily it seems there's only one metadata function that uses off_t in public API. 2. i686-pc-mingw also needs fseeko()/ftello() definitions (only fseeko64() and ftello64() available)....
2013 Mar 06
0
Updated MSVC patch
Great. I need to correct my statement, the check for _MSC_VER <= 1600 was the culprit, like this case: #if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ #include <sys/types.h> /* for off_t */ #if _MSC_VER <= 1600 || defined __BORLANDC__ /* @@@ [2G limit] */ #ifndef fseeko #define fseeko fseek #ifndef fseeko #define fseeko fseek #endif #endif Cheers, Cristian. On Wed, Mar 6, 2013 at 6:24 PM, Ben Allison <benski at winamp.com> wrote: > Those checks account for compiler changes/improvements introduced in > Visual Studio 2010 that are not present in Visua...
2013 Mar 06
1
Updated MSVC patch
...y statement, the check for _MSC_VER <= 1600 > was the culprit, like this case: > > #if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ > #include <sys/types.h> /* for off_t */ > #if _MSC_VER <= 1600 || defined __BORLANDC__ /* @@@ [2G limit] */ > #ifndef fseeko > #define fseeko fseek > #ifndef fseeko > #define fseeko fseek > #endif > #endif > > Cheers, > Cristian. > > On Wed, Mar 6, 2013 at 6:24 PM, Ben Allison <benski at winamp.com> wrote: > >> Those checks account for compiler changes/improvements introduced...
2001 May 21
1
2.9p1 patches
...file offset, on hosts where this is settable.], + AC_SYS_LARGEFILE_TEST_INCLUDES) + AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, + ac_cv_sys_large_files, + [Define for large files, on AIX-style hosts.], + AC_SYS_LARGEFILE_TEST_INCLUDES) + fi + ]) + +AC_DEFUN(AC_FUNC_FSEEKO, + [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, + ac_cv_sys_largefile_source, + [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], + [#include <stdio.h>], [return !fseeko;]) + # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug + # in gl...
2007 Aug 27
1
fix for broken largefile seek() on 32-bit linux (PR#9883)
...gigabytefile.dat", "rb") > seek(f, 3e9, "start", "r") [1] 0 ## correct > seek(f, NA, "start", "r") [1] 0 ## should be 3e+09 DIAGNOSIS Typo: the compile-time tests for large file support use "HAVE_SEEKO" instead of "HAVE_FSEEKO", and so fail. The same typo appears in one of the extra/zlib files, so I'm fixing it in the patch below, but I haven't tested whether that actually produces a bug. PATCH Index: src/extra/zlib/gzio.c =================================================================== --- src/extra/...
2013 May 04
5
Bug fix and compatibility patches for 1.3.0pre4
...hanged compat.h and replaced them with calls to _lseeki64, which was available at least back to Windows 98 and thus doesn't impose such compatibility issues. However, the patch only represents my quick and dirty solution and you'll probably like to find a cleaner one. Maybe all calls to fseeko and ftello should be put in OS specific wrapper functions. Would love to see those patches in the 1.3.0 release. Robert -------------- next part -------------- diff -Naur flac-1.3.0pre4/include/share/compat.h flac-1.3.0pre4-patched/include/share/compat.h --- flac-1.3.0pre4/include/share/compat.h...
2014 May 13
0
[PATCH] isohybrid: fix overflow on 32 bit system
No #if. On May 12, 2014 6:26:18 PM PDT, Kang Kai <Kai.Kang at windriver.com> wrote: >On 2014?05?12? 22:38, H. Peter Anvin wrote: >> That is because it needs to use fseeko() and use off_t. > >Do you mean it does need a patch for isohybrid.c. And the patch looks >like: > >#if _FILE_OFFSET_BITS == 64 > fseeko(...) >#else > fseek(...) > > >Regards, >Kai > >> >> On May 11, 2014 11:53:17 PM PDT, Kang Kai <Kai.Ka...
2014 Jun 22
5
isohybrid has 2 variants
.... > > Yeah. It also has problems with large (image) file support. > Already reported in may and diagnosed by hpa: > > http://www.syslinux.org/archives/2014-May/022041.html: > > The right thing to do is compile it with #define _FILE_OFFSET_BITS 64 > > and change fseek to fseeko with the appropriate type being off_t. This has been already applied in the Syslinux git (zytor repo). > > This brings of course the question how to do this on MS-Windows. > > That's why i asked for a DOS exe that can handle 43 bit file byte > addressing (32 bit ISO block c...
2014 May 12
4
[PATCH] isohybrid: fix overflow on 32 bit system
When call isohybrid with option '-u', it overflows on a 32 bits host. It seeks to 512 bytes before the end of the image to install gpt header. If the size of image is larger than LONG_MAX, it overflows fseek() and cause error: isohybrid: wrlinux-image-x86-64-20140505110100.iso: seek error - 8: Invalid argument Check the offset and call fseek() multi-times if offset is too large.
2013 Mar 05
0
2GB limit patch
...d 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 when > calling fseeko(), it gets truncated to 32bit on Win32 even if you use > _fseeki64(). > This change results in ABI break, but luckily it seems there's only one > metadata function that uses off_t in public API. > > 2. i686-pc-mingw also needs fseeko()/ftello() definitions (only > fseeko64() a...
2013 Mar 10
0
flac 1.3.0pre2 pre-release
...> > http://downloads.xiph.org/releases/flac/beta/ > src/libFLAC/metadata_iterators.c:442:4: warning: implicit declaration of function 'ftello' [-Wimplicit-function-declaration] Same with ftello, it's all over the source code. Curiously, config.h contains: /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ /* #undef HAVE_FSEEKO */ for me, but FLAC doesn't seem to care... Here's a patch i've used. Compiles (mingw.org i386 gcc 4.7.2 + MSYS), passes the testsuite. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Usi...