8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

Do not use exotic fgetpos()

This commit is contained in:
alexpeshkoff 2009-02-02 15:04:08 +00:00
parent 5827b3d413
commit a8e3353145

View File

@ -35,7 +35,7 @@
#include "../jrd/gds_proto.h"
#include "../jrd/ibase.h"
#include "../common/classes/ClumpletWriter.h"
#include "../common/classes/TimeStamp.h"
#include "../common/classes/timestamp.h"
#include "../common/utils_proto.h"
#include "../common/classes/MsgPrint.h"
@ -130,11 +130,8 @@ bool putFileFromArgument(char**& av, ClumpletWriter& spb, unsigned int tag)
if (!file) {
(Arg::Gds(isc_fbsvcmgr_fp_open) << *av << Arg::OsError()).raise();
}
fseek(file, 0, SEEK_END);
fpos_t len;
fgetpos(file, &len);
off_t len = fseek(file, 0, SEEK_END);
if (!len) {
(Arg::Gds(isc_fbsvcmgr_fp_empty) << *av).raise();
}