8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 17:23:03 +01:00

Fixed some warnings

This commit is contained in:
alexpeshkoff 2009-04-03 10:49:07 +00:00
parent d2e9cc9ae0
commit 77498cac9b
23 changed files with 110 additions and 88 deletions

View File

@ -6,7 +6,7 @@ Author:
Function:
Common Table Expressions is like views, locally defined within main query.
Common Table Expressions is like views, locally defined within main query.
From the engine point of view CTE is a derived table so no intermediate
materialization is performed.
@ -45,11 +45,11 @@ select_expr_body : query_term
Or, in less formal format :
WITH [RECURSIVE]
CTE_A [(a1, a2, )]
AS ( SELECT ),
CTE_A [(a1, a2, ...)]
AS ( SELECT ... ),
CTE_B [(b1, b2, )]
AS ( SELECT ),
CTE_B [(b1, b2, ...)]
AS ( SELECT ... ),
...
SELECT ...
FROM CTE_A, CTE_B, TAB1, TAB2 ...
@ -60,7 +60,7 @@ SELECT ...
Rules of non-recursive common table expressions :
Several table expressions can be defined at one query
Any SELECTs clause can be used in table expressions
Any SELECTs clause can be used in table expressions
Table expressions can reference each other
Table expressions can be used within any part of main query or another
table expression
@ -104,7 +104,7 @@ Rules of recursive common table expressions :
Non-recursive members are placed first in UNION
Recursive members are separated from anchor members and from each
other with UNION ALL clause
References between CTEs should not have loops
References between CTEs should not have loops
Aggregates (DISTINCT, GROUP BY, HAVING) and aggregate functions (SUM,
COUNT, MAX etc) are not allowed in recursive members
Recursive member can have only one reference to itself and only in FROM clause

View File

@ -19,7 +19,7 @@ Expression indices
Example(s):
1. CREATE INDEX IDX1 ON T1 COMPUTED BY ( UPPER(COL1 COLLATE PXW_CYRL) );
SELECT * FROM T1 WHERE UPPER(COL1 COLLATE PXW_CYRL) = 'ÔÛÂÀ'
SELECT * FROM T1 WHERE UPPER(COL1 COLLATE PXW_CYRL) = '<capital cyrillic letters sequence>'
-- PLAN (T1 INDEX (IDX1))
2. CREATE INDEX IDX2 ON T2 COMPUTED BY ( EXTRACT(YEAR FROM COL2) || EXTRACT(MONTH FROM COL2) );
SELECT * FROM T2 ORDER BY EXTRACT(YEAR FROM COL2) || EXTRACT(MONTH FROM COL2)

View File

@ -67,11 +67,11 @@ database of course). This is much quicker than traditional row by row delete +
garbage collection of deleted record versions. DELETE triggers are not fired in
this case.
Data and index pages of all of the GTTs instances are placed in separate temporary
files. Each connection has its own temporary file created when this connection
first referenced some GTT. Also these temporary files are always opened with Forced
Writes = OFF setting despite of database setting.
Data and index pages of all of the GTTs instances are placed in separate temporary
files. Each connection has its own temporary file created when this connection
first referenced some GTT. Also these temporary files are always opened with "Forced
Writes = OFF" setting despite of database setting.
There's no limit on number of GTT instances. If you have N transactions
active simultaneously and each transaction has referenced some GTT then youll
have N GTTs instances.
active simultaneously and each transaction has referenced some GTT then you'll
have N GTT's instances.

36
extern/regex/main.c vendored
View File

@ -74,9 +74,9 @@ char *argv[];
exit(status);
}
err = regcomp(&re, argv[optind++], copts);
err = regComp(&re, argv[optind++], copts);
if (err) {
len = regerror(err, &re, erbuf, sizeof(erbuf));
len = regError(err, &re, erbuf, sizeof(erbuf));
fprintf(stderr, "error %s, %d/%d `%s'\n",
eprint(err), len, sizeof(erbuf), erbuf);
exit(status);
@ -84,7 +84,7 @@ char *argv[];
regprint(&re, stdout);
if (optind >= argc) {
regfree(&re);
regFree(&re);
exit(status);
}
@ -92,9 +92,9 @@ char *argv[];
subs[0].rm_so = startoff;
subs[0].rm_eo = strlen(argv[optind]) - endoff;
}
err = regexec(&re, argv[optind], (size_t)NS, subs, eopts);
err = regExec(&re, argv[optind], (size_t)NS, subs, eopts);
if (err) {
len = regerror(err, &re, erbuf, sizeof(erbuf));
len = regError(err, &re, erbuf, sizeof(erbuf));
fprintf(stderr, "error %s, %d/%d `%s'\n",
eprint(err), len, sizeof(erbuf), erbuf);
exit(status);
@ -163,27 +163,27 @@ FILE *in;
options('c', f[1]) &~ REG_EXTENDED);
}
ne = regerror(REG_BADPAT, (regex_t *)NULL, erbuf, sizeof(erbuf));
ne = regError(REG_BADPAT, (regex_t *)NULL, erbuf, sizeof(erbuf));
if (strcmp(erbuf, badpat) != 0 || ne != strlen(badpat)+1) {
fprintf(stderr, "end: regerror() test gave `%s' not `%s'\n",
erbuf, badpat);
status = 1;
}
ne = regerror(REG_BADPAT, (regex_t *)NULL, erbuf, (size_t)SHORT);
ne = regError(REG_BADPAT, (regex_t *)NULL, erbuf, (size_t)SHORT);
if (strncmp(erbuf, badpat, SHORT-1) != 0 || erbuf[SHORT-1] != '\0' ||
ne != strlen(badpat)+1) {
fprintf(stderr, "end: regerror() short test gave `%s' not `%.*s'\n",
erbuf, SHORT-1, badpat);
status = 1;
}
ne = regerror(REG_ITOA|REG_BADPAT, (regex_t *)NULL, erbuf, sizeof(erbuf));
ne = regError(REG_ITOA|REG_BADPAT, (regex_t *)NULL, erbuf, sizeof(erbuf));
if (strcmp(erbuf, bpname) != 0 || ne != strlen(bpname)+1) {
fprintf(stderr, "end: regerror() ITOA test gave `%s' not `%s'\n",
erbuf, bpname);
status = 1;
}
re.re_endp = bpname;
ne = regerror(REG_ATOI, &re, erbuf, sizeof(erbuf));
ne = regError(REG_ATOI, &re, erbuf, sizeof(erbuf));
if (atoi(erbuf) != (int)REG_BADPAT) {
fprintf(stderr, "end: regerror() ATOI test gave `%s' not `%ld'\n",
erbuf, (long)REG_BADPAT);
@ -226,10 +226,10 @@ int opts; /* may not match f1 */
strcpy(f0copy, f0);
re.re_endp = (opts&REG_PEND) ? f0copy + strlen(f0copy) : NULL;
fixstr(f0copy);
err = regcomp(&re, f0copy, opts);
err = regComp(&re, f0copy, opts);
if (err != 0 && (!opt('C', f1) || err != efind(f2))) {
/* unexpected error or wrong error */
len = regerror(err, &re, erbuf, sizeof(erbuf));
len = regError(err, &re, erbuf, sizeof(erbuf));
fprintf(stderr, "%d: %s error %s, %d/%d `%s'\n",
line, type, eprint(err), len,
sizeof(erbuf), erbuf);
@ -243,7 +243,7 @@ int opts; /* may not match f1 */
}
if (err != 0) {
regfree(&re);
regFree(&re);
return;
}
@ -256,11 +256,11 @@ int opts; /* may not match f1 */
subs[0].rm_so = strchr(f2, '(') - f2 + 1;
subs[0].rm_eo = strchr(f2, ')') - f2;
}
err = regexec(&re, f2copy, NSUBS, subs, options('e', f1));
err = regExec(&re, f2copy, NSUBS, subs, options('e', f1));
if (err != 0 && (f3 != NULL || err != REG_NOMATCH)) {
/* unexpected error or wrong error */
len = regerror(err, &re, erbuf, sizeof(erbuf));
len = regError(err, &re, erbuf, sizeof(erbuf));
fprintf(stderr, "%d: %s exec error %s, %d/%d `%s'\n",
line, type, eprint(err), len,
sizeof(erbuf), erbuf);
@ -282,7 +282,7 @@ int opts; /* may not match f1 */
}
if (err != 0 || f4 == NULL) {
regfree(&re);
regFree(&re);
return;
}
@ -303,7 +303,7 @@ int opts; /* may not match f1 */
}
}
regfree(&re);
regFree(&re);
}
/*
@ -485,7 +485,7 @@ int err;
static char epbuf[100];
size_t len;
len = regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf));
len = regError(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf));
assert(len <= sizeof(epbuf));
return(epbuf);
}
@ -505,6 +505,6 @@ char *name;
sprintf(efbuf, "REG_%s", name);
assert(strlen(efbuf) < sizeof(efbuf));
re.re_endp = efbuf;
(void) regerror(REG_ATOI, &re, efbuf, sizeof(efbuf));
(void) regError(REG_ATOI, &re, efbuf, sizeof(efbuf));
return(atoi(efbuf));
}

View File

@ -83,7 +83,7 @@ static int never = 0; /* for use in asserts; shuts lint up */
= #define REG_DUMP 0200
*/
int /* 0 success, otherwise REG_something */
regcomp(preg, pattern, cflags)
regComp(preg, pattern, cflags)
regex_t *preg;
const char *pattern;
int cflags;
@ -178,7 +178,7 @@ int cflags;
/* win or lose, we're done */
if (p->error != 0) /* lose */
regfree(preg);
regFree(preg);
return(p->error);
}

View File

@ -61,7 +61,7 @@ static struct rerr {
*/
/* ARGSUSED */
size_t
regerror(_errcode, preg, errbuf, errbuf_size)
regError(_errcode, preg, errbuf, errbuf_size)
int _errcode;
const regex_t *preg;
char *errbuf;

12
extern/regex/regex.h vendored
View File

@ -1,5 +1,5 @@
#ifndef _REGEX_H_
#define _REGEX_H_ /* never again */
#ifndef _REGEX_FB_H_
#define _REGEX_FB_H_ /* never again */
/* ========= begin header generated by ./mkh ========= */
#ifdef __cplusplus
extern "C" {
@ -20,7 +20,7 @@ typedef struct {
/* === ./regcomp.c === */
extern int regcomp(regex_t *, const char *, int);
extern int regComp(regex_t *, const char *, int);
#define REG_BASIC 0000
#define REG_EXTENDED 0001
#define REG_ICASE 0002
@ -51,11 +51,11 @@ extern int regcomp(regex_t *, const char *, int);
#define REG_INVARG 16
#define REG_ATOI 255 /* convert name to number (!) */
#define REG_ITOA 0400 /* convert number to name (!) */
extern size_t regerror(int, const regex_t *, char *, size_t);
extern size_t regError(int, const regex_t *, char *, size_t);
/* === ./regexec.c === */
extern int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
extern int regExec(const regex_t *, const char *, size_t, regmatch_t [], int);
#define REG_NOTBOL 00001
#define REG_NOTEOL 00002
#define REG_STARTEND 00004
@ -65,7 +65,7 @@ extern int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
/* === ./regfree.c === */
extern void regfree(regex_t *);
extern void regFree(regex_t *);
#ifdef __cplusplus
}

View File

@ -110,7 +110,7 @@ static int nope = 0; /* for use in asserts; shuts lint up */
* have been prototyped.
*/
int /* 0 success, REG_NOMATCH failure */
regexec(preg, string, nmatch, pmatch, eflags)
regExec(preg, string, nmatch, pmatch, eflags)
const regex_t *preg;
const char *string;
size_t nmatch;

View File

@ -11,7 +11,7 @@
= extern void regfree(regex_t *);
*/
void
regfree(preg)
regFree(preg)
regex_t *preg;
{
register struct re_guts *g;

View File

@ -218,7 +218,7 @@ int main( int argc, char *argv[])
if (strlen(string) > MAX_FILE_NM_LEN) {
fprintf(stderr, "%s: file name %s is too long\n", prog_name, string);
fprintf(stderr, "%s: maximum length of file name is %d bytes\n",
fprintf(stderr, "%s: maximum length of file name is %"SIZEFORMAT" bytes\n",
prog_name, MAX_FILE_NM_LEN);
print_clo(prog_name);
free_file_list(file_list);

View File

@ -1660,7 +1660,9 @@ static void datetime_to_text(const dsc* from, dsc* to, Callbacks* cb)
// Convert a date or time value into a timestamp for manipulation
tm times = {0};
tm times;
memset(&times, 0, sizeof(struct tm));
int fractions = 0;
switch (from->dsc_dtype)

View File

@ -547,14 +547,14 @@ static void extract_database(const TEXT * DB_file_nameL)
FOR F IN RDB$FILES WITH F.RDB$SHADOW_NUMBER MISSING OR
F.RDB$SHADOW_NUMBER EQ 0
name_trunc(F.RDB$FILE_NAME, buffer);
fprintf(output_file, "\n\tfile \"%s\" starting at page %ld",
fprintf(output_file, "\n\tfile \"%s\" starting at page %"SLONGFORMAT,
buffer, F.RDB$FILE_START);
END_FOR;
}
else {
FOR F IN RDB$FILES
name_trunc(F.RDB$FILE_NAME, buffer);
fprintf(output_file, "\n\tfile \"%s\" starting at page %ld",
fprintf(output_file, "\n\tfile \"%s\" starting at page %"SLONGFORMAT,
buffer, F.RDB$FILE_START);
END_FOR;
}
@ -592,7 +592,7 @@ static void extract_database(const TEXT * DB_file_nameL)
fprintf(output_file, ",\n\t\t\"%s\"", F.RDB$FILE_NAME);
if (F.RDB$FILE_LENGTH)
fprintf(output_file, " size = %ld", F.RDB$FILE_LENGTH);
fprintf(output_file, " size = %"SLONGFORMAT, F.RDB$FILE_LENGTH);
if (F.RDB$FILE_PARTITIONS)
fprintf(output_file, " partitions = %d",
@ -613,7 +613,7 @@ static void extract_database(const TEXT * DB_file_nameL)
fprintf(output_file, " \"%s\"", F.RDB$FILE_NAME);
if (F.RDB$FILE_LENGTH)
fprintf(output_file, " size = %ld", F.RDB$FILE_LENGTH);
fprintf(output_file, " size = %"SLONGFORMAT, F.RDB$FILE_LENGTH);
if (F.RDB$FILE_PARTITIONS)
fprintf(output_file, " partitions = %d",
@ -655,7 +655,7 @@ static void extract_database(const TEXT * DB_file_nameL)
SORTED BY F.RDB$SHADOW_NUMBER, F.RDB$FILE_START
name_trunc(F.RDB$FILE_NAME, buffer);
if (F.RDB$FILE_START)
fprintf(output_file, "\n\tfile \"%s\" starting at page %ld",
fprintf(output_file, "\n\tfile \"%s\" starting at page %"SLONGFORMAT,
buffer, F.RDB$FILE_START);
else
fprintf(output_file, "%s\ndefine shadow %d \"%s\"",
@ -2053,9 +2053,9 @@ static void type_scalar(USHORT dtype,
D.RDB$FIELD_NAME EQ field_name
SORTED BY D.RDB$DIMENSION
if (D.RDB$LOWER_BOUND == 1)
fprintf(output_file, "%c%ld", c, D.RDB$UPPER_BOUND);
fprintf(output_file, "%c%"SLONGFORMAT, c, D.RDB$UPPER_BOUND);
else
fprintf(output_file, "%c%ld:%ld", c, D.RDB$LOWER_BOUND,
fprintf(output_file, "%c%"SLONGFORMAT":%"SLONGFORMAT, c, D.RDB$LOWER_BOUND,
D.RDB$UPPER_BOUND);
c = ',';
END_FOR;

View File

@ -866,7 +866,7 @@ static void gen_based( const act* action, int column)
fprintf(gpreGlob.out_file, "%s", variable);
if (based_on->bas_flags & BAS_segment) {
if (*variable != '*')
fprintf(gpreGlob.out_file, "[%ld]", length);
fprintf(gpreGlob.out_file, "[%"SLONGFORMAT"]", length);
}
else if (field->fld_array_info)
{
@ -875,7 +875,7 @@ static void gen_based( const act* action, int column)
for (const dim* dimension = field->fld_array_info->ary_dimension;
dimension; dimension = dimension->dim_next)
{
fprintf(gpreGlob.out_file, " [%ld]", dimension->dim_upper - dimension->dim_lower + 1);
fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1);
}
if (field->fld_array_info->ary_dtype <= dtype_varying && field->fld_length > 1)
@ -1547,7 +1547,7 @@ static void gen_drop_database( const act* action, int column)
const gpre_dbb* db = (gpre_dbb*) action->act_object;
align(column);
fprintf(gpreGlob.out_file, "isc_drop_database (%s, %d, \"%s\", rdb$k_db_type_gds);",
fprintf(gpreGlob.out_file, "isc_drop_database (%s, %"SIZEFORMAT", \"%s\", rdb$k_db_type_gds);",
status_vector(action),
strlen(db->dbb_filename), db->dbb_filename);
set_sqlcode(action, column);
@ -3541,7 +3541,7 @@ static void make_array_declaration(ref* reference)
for (const dim* dimension = field->fld_array_info->ary_dimension; dimension;
dimension = dimension->dim_next)
{
fprintf(gpreGlob.out_file, " [%ld]", dimension->dim_upper - dimension->dim_lower + 1);
fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1);
}
if (field->fld_array_info->ary_dtype <= dtype_varying)

View File

@ -2531,9 +2531,9 @@ static void pass2( SLONG start_position)
line++;
if (line_pending) {
if (line == 1)
fprintf(gpreGlob.out_file, "#line %ld \"%s\"\n", line, backlash_fixed_file_name);
fprintf(gpreGlob.out_file, "#line %"SLONGFORMAT" \"%s\"\n", line, backlash_fixed_file_name);
else
fprintf(gpreGlob.out_file, "\n#line %ld \"%s\"", line, backlash_fixed_file_name);
fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line, backlash_fixed_file_name);
line_pending = false;
}
@ -2669,7 +2669,7 @@ static void pass2( SLONG start_position)
while ((c = get_char(input_file)) != EOF)
{
if (c == '\n' && line_pending) {
fprintf(gpreGlob.out_file, "\n#line %ld \"%s\"", line + 1, backlash_fixed_file_name);
fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line + 1, backlash_fixed_file_name);
line_pending = false;
}
if (c == EOF) {

View File

@ -627,9 +627,21 @@ struct ISC_TIMESTAMP
#endif
#endif
#ifndef SIZEFORMAT
#if (SIZEOF_LONG == 8) && defined(__GNUC__)
#define SIZEFORMAT "ld"
#else
#define SIZEFORMAT "d"
#endif
#endif // SIZEFORMAT
//format for __LINE__
#ifndef LINEFORMAT
#ifdef __GNUC__
#define LINEFORMAT "d"
#else
#define LINEFORMAT "ld"
#endif // __GNUC__
#endif
/* conditional compilation macros */
@ -884,7 +896,7 @@ static const TEXT FB_SHORT_MONTHS[][4] =
"\0"
};
static const TEXT* FB_LONG_MONTHS_UPPER[] =
static const TEXT* const FB_LONG_MONTHS_UPPER[] =
{
"JANUARY",
"FEBRUARY",

View File

@ -32,19 +32,21 @@
#ifndef JRD_FILE_PARAMS_H
#define JRD_FILE_PARAMS_H
static const char* EVENT_FILE = "fb_event_%s";
static const char* LOCK_FILE = "fb_lock_%s";
static const char* MONITOR_FILE = "fb_monitor_%s";
static const char* TRACE_FILE = "fb_trace";
static const char* const EVENT_FILE = "fb_event_%s";
static const char* const LOCK_FILE = "fb_lock_%s";
static const char* const MONITOR_FILE = "fb_monitor_%s";
static const char* const TRACE_FILE = "fb_trace";
#ifdef UNIX
static const char* INIT_FILE = "fb_init";
static const char* SEM_FILE = "fb_sem";
static const char* const INIT_FILE = "fb_init";
static const char* const SEM_FILE = "fb_sem";
#endif
// CVC: Do we really need this information here after using autoconf?
#if defined(sun) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD)
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_IPC_H
#include <sys/ipc.h>
#endif
@ -57,15 +59,15 @@ static const char* SEM_FILE = "fb_sem";
/* keep MSG_FILE_LANG in sync with build_file.epp */
#ifdef WIN_NT
static const char* WORKFILE = "c:\\temp\\";
static const char* const WORKFILE = "c:\\temp\\";
static const char MSG_FILE_LANG[]= "intl\\%.10s.msg";
#else
static const char* WORKFILE = "/tmp/";
static const char* const WORKFILE = "/tmp/";
static const char MSG_FILE_LANG[]= "intl/%.10s.msg";
#endif
static const char* LOGFILE = "firebird.log";
static const char* MSG_FILE = "firebird.msg";
static const char* const LOGFILE = "firebird.log";
static const char* const MSG_FILE = "firebird.msg";
// Keep in sync with MSG_FILE_LANG
const int LOCALE_MAX = 10;

View File

@ -37,7 +37,7 @@
const size_t MAX_PASSWORD_ENC_LENGTH = 12; // passed by remote protocol
const size_t MAX_PASSWORD_LENGTH = 64; // used to store passwords internally
static const char* PASSWORD_SALT = "9z"; // for old ENC_crypt()
static const char* const PASSWORD_SALT = "9z"; // for old ENC_crypt()
const size_t SALT_LENGTH = 12; // measured after base64 coding
namespace Jrd {

View File

@ -37,7 +37,7 @@
#define NTRACE_VERSION 2
// plugin entry point
static const char* NTRACE_ATTACH = "trace_create";
static const char* const NTRACE_ATTACH = "trace_create";
/* Database objects*/

View File

@ -3484,7 +3484,7 @@ static USHORT find_order(thread_db* tdbb,
fprintf(opt_debug_file, "%2.2d ", tail->opt_best_stream);
}
fprintf(opt_debug_file,
"\n\t\t\tbest_cost: %g\tcombinations: %ld\n",
"\n\t\t\tbest_cost: %g\tcombinations: %"SLONGFORMAT"\n",
opt->opt_best_cost, opt->opt_combinations);
}
#endif

View File

@ -1065,7 +1065,7 @@ static void prt_owner(OUTFILE outfile,
owner->own_owner_id, owner->own_owner_type,
(const TEXT*)HtmlLink(preRequest, owner->own_pending_request));
FPRINTF(outfile, "\tProcess id: %6d (%s), thread id: %6d\n",
FPRINTF(outfile, "\tProcess id: %6d (%s), thread id: %6"SIZEFORMAT"\n",
process->prc_process_id,
ISC_check_process_existence(process->prc_process_id) ? "Alive" : "Dead",
owner->own_thread_id);
@ -1265,7 +1265,7 @@ static void prt_que(OUTFILE outfile,
SRQ_LOOP((*que_inst), next)
++count;
FPRINTF(outfile, "%s (%ld):\tforward: %s, backward: %s\n", string, count,
FPRINTF(outfile, "%s (%"SLONGFORMAT"):\tforward: %s, backward: %s\n", string, count,
(const TEXT*) HtmlLink(prefix, que_inst->srq_forward - que_offset),
(const TEXT*) HtmlLink(prefix, que_inst->srq_backward - que_offset));
}

View File

@ -89,8 +89,8 @@ const int FAC_SQL_POSITIVE = 14; // facility for positive SQL codes
const int FAC_SQL_NEGATIVE = 13; // ditto for negative codes
const int gds_facility_local = 20;
const SLONG gds_base_local = (SLONG) gds_facility_local << 24;
const SLONG gds_factor_local = 1;
const int gds_base_local = (SLONG) gds_facility_local << 24;
const int gds_factor_local = 1;
static const char *license[] = {
@ -722,8 +722,8 @@ static void build_other_headers()
fprintf(pas_codes, "\n"
"const\n"
"\tgds_facility\t\t= %d;\n"
"\tgds_err_base\t\t= %ld;\n"
"\tgds_err_factor\t\t= %ld;\n",
"\tgds_err_base\t\t= %d;\n"
"\tgds_err_factor\t\t= %d;\n",
gds_facility_local, gds_base_local, gds_factor_local);
int numLines = FB_NELEM(pas_boiler_plate);
@ -747,8 +747,8 @@ static void build_other_headers()
fprintf(ftn_codes, "\n"
" PARAMETER (\n"
" + GDS_FACILITY = %d,\n"
" + GDS_ERR_BASE = %ld,\n"
" + GDS_ERR_FACTOR = %ld)\n",
" + GDS_ERR_BASE = %d,\n"
" + GDS_ERR_FACTOR = %d)\n",
gds_facility_local, gds_base_local, gds_factor_local);
numLines = FB_NELEM(ftn_boiler_plate_data);

View File

@ -1382,7 +1382,7 @@ static void string_to_date(const TEXT* string, USHORT length, SLONG date[2])
p++;
}
*t = 0;
const TEXT** month_ptr = FB_LONG_MONTHS_UPPER;
const TEXT* const* month_ptr = FB_LONG_MONTHS_UPPER;
while (true)
{
if (!*month_ptr)

View File

@ -116,9 +116,11 @@ const char* FIREBIRD_USER_NAME = "firebird";
static void set_signal(int, void (*)(int));
static void signal_handler(int);
#ifdef SUPERSERVER
static int shutdownInetServer(const int reason, const int, void*);
static void shutdownInit();
static int tryStopMainThread();
#endif
static TEXT protocol[128];
static int INET_SERVER_start = 0;
@ -480,7 +482,7 @@ static void signal_handler(int)
++INET_SERVER_start;
}
#ifdef SUPERSERVER
static int shutdownInetServer(const int reason, const int, void*)
{
/****************************************************
@ -515,6 +517,7 @@ static int shutdownInetServer(const int reason, const int, void*)
return reason == fb_shutrsn_exit_called ? FB_SUCCESS : FB_FAILURE;
}
static void shutdownInit()
{
setStopMainThread(tryStopMainThread);
@ -529,6 +532,7 @@ static void shutdownInit()
}
}
static int tryStopMainThread()
{
/****************************************************
@ -543,3 +547,5 @@ static int tryStopMainThread()
**************************************/
return serverClosing ? 1 : 0;
}
#endif