Mailing List Archive

r3847 - in trunk: charmonizer/src/Charmonizer/Probe compat/windows perl/buildlib/Lucy
Author: creamyg
Date: 2008-09-08 22:31:34 -0700 (Mon, 08 Sep 2008)
New Revision: 3847

Removed:
trunk/compat/windows/lfs.c
trunk/compat/windows/lfs.h
Modified:
trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm
trunk/perl/buildlib/Lucy/Build.pm
Log:
Ditch ftello64 emulation for outdated Windows compilers.


Modified: trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm
===================================================================
--- trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm 2008-09-09 04:18:38 UTC (rev 3846)
+++ trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.charm 2008-09-09 05:31:34 UTC (rev 3847)
@@ -22,8 +22,8 @@
{ "#include <sys/types.h>\n", "fopen64", "ftello64", "fseeko64", "off64_t" },
{ "#include <sys/types.h>\n", "fopen", "ftello64", "fseeko64", "off64_t" },
{ "#include <sys/types.h>\n", "fopen", "ftello", "fseeko", "off_t" },
+ { "", "fopen", "_ftelli64", "_fseeki64", "__int64" },
{ "", "fopen", "ftell", "fseek", "long" },
- { "", "fopen", "_ftelli64", "_fseeki64", "__int64" },
{ NULL, NULL, NULL, NULL, NULL }
};
typedef struct unbuff_combo {

Deleted: trunk/compat/windows/lfs.c
===================================================================
--- trunk/compat/windows/lfs.c 2008-09-09 04:18:38 UTC (rev 3846)
+++ trunk/compat/windows/lfs.c 2008-09-09 05:31:34 UTC (rev 3847)
@@ -1,44 +0,0 @@
-#include "lfs.h"
-#include <errno.h>
-
-off64_t
-ftello64(FILE *fh)
-{
- fpos_t pos;
- if (fgetpos(fh, &pos))
- return -1;
- else
- return (off64_t)pos;
-}
-
-int
-fseeko64(FILE *fh, off64_t offset, int whence)
-{
- fpos_t pos;
-
- switch (whence) {
-
- case SEEK_SET:
- break;
-
- case SEEK_END:
- fseek(fh, 0, SEEK_END); /* sync buffering */
- if ((pos = _telli64(fileno(fh))) == -1)
- return -1;
- offset += pos;
- break;
-
- case SEEK_CUR:
- if (fgetpos(fh, &pos))
- return -1;
- offset += pos;
- break;
-
- default:
- errno = EINVAL;
- return -1;
- }
-
- return fsetpos(fh, &offset);
-}
-

Deleted: trunk/compat/windows/lfs.h
===================================================================
--- trunk/compat/windows/lfs.h 2008-09-09 04:18:38 UTC (rev 3846)
+++ trunk/compat/windows/lfs.h 2008-09-09 05:31:34 UTC (rev 3847)
@@ -1,21 +0,0 @@
-#ifndef H_KINO_WIN_LFS
-#define H_KINO_WIN_LFS 1
-
-#define LUCY_HAS_LARGE_FILE_SUPPORT
-#if defined(CHAZ_USE_SHORT_NAMES) || defined(LUCY_USE_SHORT_NAMES)
- #define HAS_LARGE_FILE_SUPPORT
-#endif
-
-#include <io.h>
-#include <stdio.h>
-
-typedef __int64 off64_t;
-
-off64_t
-ftello64(FILE *fh);
-
-int
-fseeko64(FILE *fh, off64_t offset, int whence);
-
-#endif /* H_KINO_WIN_LFS */
-

Modified: trunk/perl/buildlib/Lucy/Build.pm
===================================================================
--- trunk/perl/buildlib/Lucy/Build.pm 2008-09-09 04:18:38 UTC (rev 3846)
+++ trunk/perl/buildlib/Lucy/Build.pm 2008-09-09 05:31:34 UTC (rev 3847)
@@ -62,7 +62,6 @@
my $CHARMONIZER_GEN_DIR = catdir( $CHARMONIZER_ORIG_DIR, 'gen' );
my $C_SOURCE_DIR = catdir( $base_dir, 'c_src' );
my $H_SOURCE_DIR = catdir( $C_SOURCE_DIR, 'h' );
-my $WINCOMPAT_SOURCE_DIR = catdir( $base_dir, 'compat', 'windows' );
my $XS_SOURCE_DIR = 'xs';
my $AUTOBIND_PM_PATH = catfile(qw( lib KinoSearch Autobinding.pm ));
my $AUTOBIND_XS_PATH = catfile(qw( lib KinoSearch Autobinding.xs ));
@@ -367,18 +366,11 @@
curdir(), $C_SOURCE_DIR, $H_SOURCE_DIR, $XS_SOURCE_DIR,
$CHARMONIZER_GEN_DIR,
);
- if ( $Config{osname} =~ /mswin/i ) {
- push @include_dirs, $WINCOMPAT_SOURCE_DIR;
- }
my @objects;

# Compile C source files.
my $c_files = $self->rscan_dir( $C_SOURCE_DIR, qr/\.c$/ );
push @$c_files, @{ $self->rscan_dir( $XS_SOURCE_DIR, qr/\.c$/ ) };
- if ( $Config{osname} =~ /mswin/i ) {
- push @$c_files, @{ $self->rscan_dir( $WINCOMPAT_SOURCE_DIR,
- qr/\.c$/ ) };
- }
push @$c_files, @{ $self->rscan_dir( $CHARMONIZER_GEN_DIR, qr/\.c$/ ) };
for my $c_file (@$c_files) {
my $o_file = $c_file;


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits