Displaying 7 results from an estimated 7 matches for "have_off_t".
2007 Aug 27
1
fix for broken largefile seek() on 32-bit linux (PR#9883)
...that actually
produces a bug.
PATCH
Index: src/extra/zlib/gzio.c
===================================================================
--- src/extra/zlib/gzio.c (revision 42664)
+++ src/extra/zlib/gzio.c (working copy)
@@ -25,7 +25,7 @@
#include "zutil.h"
/* R ADDITION */
-#if defined(HAVE_OFF_T) && defined(HAVE_SEEKO)
+#if defined(HAVE_OFF_T) && defined(HAVE_FSEEKO)
#define f_seek fseeko
#define f_tell ftello
#else
Index: src/include/Rconnections.h
===================================================================
--- src/include/Rconnections.h (revision 42664)
+++ src...
2005 May 19
1
problems with truncate() with files > 2Gb under Windows (possibly (PR#7879)
...double, which allows it to seek to a position beyond 2Gb,
the return value from seek() appears to be a 32-bit signed integer,
resulting in strange (incorrect) return values from seek(), though
otherwise not affecting correct operation.
Inspecting the code, I wonder whether the lines
#if defined(HAVE_OFF_T) && defined(__USE_LARGEFILE)
off_t pos = f_tell(fp);
#else
long pos = f_tell(fp);
#endif
in the definition of file_seek() in main/connections.c should be more
along the lines of the code defining struct fileconn in
include/Rconnections.h:
#if defined(HAVE_OFF_T) && defin...
2005 May 19
0
problems with truncate() with files > 2Gb under Windows (PR#7880)
__USE_LARGEFILE is a standard Unix way to allow > 2Gb files on 32-bit
OSes by using f{seek,tell}o Take a look at the definition of f_tell:
#if defined(HAVE_OFF_T) && defined(__USE_LARGEFILE)
#define f_seek fseeko
#define f_tell ftello
#else
#ifdef Win32
#define f_seek fseeko64
#define f_tell ftello64
#else
#define f_seek fseek
#define f_tell ftell
#endif
#endif
Windows support for > 2Gb files seemed flaky, but we did not think it was
R's jo...
2005 May 28
1
(PR#7899) seek(con, 0, "end", rw="r") does not always work
...ct output. Here's how the beginning of my modified
> file_seek() function (in main/connections.c) looks:
>
> static double file_seek(Rconnection con, double where, int origin, int rw)
> {
> Rfileconn this = con->private;
> FILE *fp = this->fp;
> #if defined(HAVE_OFF_T) && defined(__USE_LARGEFILE)
> off_t pos;
> #else
> #ifdef Win32
> off64_t pos;
> #else
> long pos;
> #endif
> #endif
> int whence = SEEK_SET;
> fflush(fp);
> pos = f_tell(fp);
>
> /* make sure both positions are set */
>...
2005 May 27
0
seek(con, 0, "end", rw="r") does not always work correctly (PR#7901)
...test case
I gave produced correct output. Here's how the beginning of my modified
file_seek() function (in main/connections.c) looks:
static double file_seek(Rconnection con, double where, int origin, int rw)
{
Rfileconn this = con->private;
FILE *fp = this->fp;
#if defined(HAVE_OFF_T) && defined(__USE_LARGEFILE)
off_t pos;
#else
#ifdef Win32
off64_t pos;
#else
long pos;
#endif
#endif
int whence = SEEK_SET;
fflush(fp);
pos = f_tell(fp);
/* make sure both positions are set */
> Note that ?seek currently tells us "The value ret...
2005 Feb 08
0
Compiling R as a shared library
...#define INT_32_BITS 1
| #define SIZEOF_LONG 8
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_LONG_DOUBLE 16
| #define F77_FUNC(name,NAME) name ## _
| #define F77_FUNC_(name,NAME) name ## __
| #define HAVE_F77_UNDERSCORE 1
| #define HAVE_DOUBLE_COMPLEX 1
| #define SHLIB_EXT ".so"
| #define HAVE_OFF_T 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_ACCESS 1
| #define HAVE_CHDIR 1
| #define HAVE_EXPM1 1
| #define HAVE_FCNTL 1
| #define HAVE_FINITE 1
| #define HAVE_FSEEKO 1
| #define HAVE_FTELLO 1
| #define HAVE_FTRUNCATE 1
| #define HAVE_GETCWD 1
| #define HAVE_GETGRGID 1
| #de...
2005 Apr 19
0
R 2.0.1 install problem on Solaris 9
...#define INT_32_BITS 1
| #define SIZEOF_LONG 4
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_LONG_DOUBLE 16
| #define F77_FUNC(name,NAME) name ## _
| #define F77_FUNC_(name,NAME) name ## __
| #define HAVE_F77_UNDERSCORE 1
| #define HAVE_DOUBLE_COMPLEX 1
| #define SHLIB_EXT ".so"
| #define HAVE_OFF_T 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_ACCESS 1
| #define HAVE_CHDIR 1
| #define HAVE_EXPM1 1
| #define HAVE_FCNTL 1
| #define HAVE_FINITE 1
| #define HAVE_FSEEKO 1
| #define HAVE_FTELLO 1
| #define HAVE_FTRUNCATE 1
| #define HAVE_GETCWD 1
| #define HAVE_GETGRGID 1
| #de...