mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 21:23:03 +01:00
Partially applied Damyan's patches from CORE-2825
This commit is contained in:
parent
7f72dbfbf5
commit
97b210a87e
@ -24,7 +24,7 @@ LINK_OPTS+=-Wl,-rpath,../gen/firebird/lib
|
||||
|
||||
PROD_FLAGS=-O -fno-builtin -DNDEBUG -DFREEBSD -pipe -MMD -fPIC
|
||||
DEV_FLAGS=-ggdb -DFREEBSD -pipe -MMD -p -fPIC -Wall
|
||||
EMBED_UTIL_TARGETS=gstat gsec nbackup fbguard fb_lock_print
|
||||
CLIENT_UTIL_TARGETS=gstat gsec fbguard fbmgr_bin nbackup fb_lock_print
|
||||
EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
|
||||
CLIENT_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
|
||||
|
||||
Physical_IO_Module=os/posix/unix.cpp
|
||||
|
@ -24,8 +24,8 @@ LINK_OPTS+=-Wl,-rpath,../gen/firebird/lib
|
||||
|
||||
PROD_FLAGS=-O -fno-builtin -DFREEBSD -DAMD64 -pipe -MMD -fPIC
|
||||
DEV_FLAGS=-ggdb -DFREEBSD -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor
|
||||
EMBED_UTIL_TARGETS=gstat gsec nbackup fbguard fb_lock_print
|
||||
CLIENT_UTIL_TARGETS=gstat gsec fbguard fbmgr_bin nbackup fb_lock_print
|
||||
EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
|
||||
CLIENT_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
|
||||
|
||||
Physical_IO_Module=os/posix/unix.cpp
|
||||
# This is needed due to broken port of gcc
|
||||
|
@ -181,8 +181,6 @@ namespace
|
||||
return rc;
|
||||
}
|
||||
#else // HAVE_POSIX_FADVISE
|
||||
#define POSIX_FADV_SEQUENTIAL 0
|
||||
#define POSIX_FADV_NOREUSE 0
|
||||
int fb_fadvise(int, off_t, size_t, int)
|
||||
{
|
||||
return 0;
|
||||
@ -450,15 +448,19 @@ void NBackup::open_database_scan()
|
||||
if (dbase < 0)
|
||||
b_error::raise(uSvc, "Error (%d) opening database file: %s", errno, dbname.c_str());
|
||||
|
||||
#ifdef POSIX_FADV_SEQUENTIAL
|
||||
int rc = fb_fadvise(dbase, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
if (rc)
|
||||
b_error::raise(uSvc, "Error (%d) in posix_fadvise(SEQUENTIAL) for %s", rc, dbname.c_str());
|
||||
#endif // POSIX_FADV_SEQUENTIAL
|
||||
#ifdef POSIX_FADV_NOREUSE
|
||||
if (direct_io)
|
||||
{
|
||||
rc = fb_fadvise(dbase, 0, 0, POSIX_FADV_NOREUSE);
|
||||
if (rc)
|
||||
b_error::raise(uSvc, "Error (%d) in posix_fadvise(NOREUSE) for %s", rc, dbname.c_str());
|
||||
}
|
||||
#endif // POSIX_FADV_NOREUSE
|
||||
|
||||
#endif // WIN_NT
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user