mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
Code Cleanup, removed "#ifdef READONLY_DATABASE" conditionals, second attempt
This commit is contained in:
parent
a96cc90b94
commit
baa3d722bf
@ -19,9 +19,13 @@
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*
|
||||
* 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
|
||||
* conditionals, as the engine now fully supports
|
||||
* readonly databases.
|
||||
*
|
||||
* 2001.08.07 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
|
||||
* conditionals, second attempt
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -133,7 +137,6 @@ EXT EXT_file(REL relation, TEXT * file_name, SLONG * description)
|
||||
strcpy(reinterpret_cast < char *>(file->ext_filename), file_name);
|
||||
|
||||
file->ext_flags = 0;
|
||||
#ifdef READONLY_DATABASE
|
||||
file->ext_ifi = (int *) NULL;
|
||||
/* If the database is updateable, then try opening the external files in
|
||||
* RW mode. If the DB is ReadOnly, then open the external files only in
|
||||
@ -142,9 +145,6 @@ EXT EXT_file(REL relation, TEXT * file_name, SLONG * description)
|
||||
if (!(dbb->dbb_flags & DBB_read_only))
|
||||
file->ext_ifi = (int *) ib_fopen(file_name, FOPEN_TYPE);
|
||||
if (!(file->ext_ifi))
|
||||
#else
|
||||
if (!(file->ext_ifi = (int *) ib_fopen(file_name, FOPEN_TYPE)))
|
||||
#endif
|
||||
{
|
||||
/* could not open the file as read write attempt as read only */
|
||||
if (!(file->ext_ifi = (int *) ib_fopen(file_name, FOPEN_READ_ONLY)))
|
||||
|
@ -33,6 +33,9 @@
|
||||
/* 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
|
||||
* conditionals, as the engine now fully supports
|
||||
* readonly databases.
|
||||
*
|
||||
* 2001.08.07 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
|
||||
* conditionals, second attempt
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -715,12 +718,10 @@ SLONG PAG_attachment_id(void)
|
||||
|
||||
/* Get new attachment id */
|
||||
|
||||
#ifdef READONLY_DATABASE
|
||||
if (dbb->dbb_flags & DBB_read_only) {
|
||||
attachment->att_attachment_id = ++dbb->dbb_attachment_id;
|
||||
}
|
||||
else {
|
||||
#endif /* READONLY_DATABASE */
|
||||
window.win_page = HEADER_PAGE;
|
||||
header = (HDR) CCH_FETCH(tdbb, &window, LCK_write, pag_header);
|
||||
CCH_MARK(tdbb, &window);
|
||||
|
@ -19,6 +19,9 @@
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*
|
||||
* 2001.08.07 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
|
||||
* conditionals, second attempt
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -172,13 +175,11 @@ void PPG_print_header( HDR header, SLONG page,
|
||||
FPRINTF(outfile, "database shutdown");
|
||||
}
|
||||
|
||||
#ifdef READONLY_DATABASE
|
||||
if (flags & hdr_read_only) {
|
||||
if (flag_count++)
|
||||
FPRINTF(outfile, ", ");
|
||||
FPRINTF(outfile, "read only");
|
||||
}
|
||||
#endif /* READONLY_DATABASE */
|
||||
FPRINTF(outfile, "\n");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user