mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:43:02 +01:00
Removed inconsistencies pointed out by Claudio Valderr.
Replaced 'defined(__osf__) && defined(__alpha)' with 'SIZEOF_LONG == 8'. New macro FB_NELEM calculates the number of elements in an array.
This commit is contained in:
parent
539e45c321
commit
39e296192c
@ -1,4 +1,4 @@
|
||||
dnl $Id: configure.in,v 1.98 2002-11-30 15:08:00 skidder Exp $
|
||||
dnl $Id: configure.in,v 1.99 2002-12-02 08:25:14 eku Exp $
|
||||
|
||||
dnl ############################# INITIALISATION ###############################
|
||||
|
||||
@ -344,6 +344,7 @@ AC_TYPE_SIGNAL
|
||||
AC_CHECK_TYPE(socklen_t,int)
|
||||
AC_SYS_LARGEFILE
|
||||
AC_CHECK_SIZEOF(void*)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_TYPE(semun)
|
||||
AC_CHECK_TYPES([struct XDR::xdr_ops],,,[#include <rpc/rpc.h>
|
||||
#include <rpc/xdr.h>])
|
||||
|
@ -76,7 +76,7 @@ ConfigImpl::ConfigImpl()
|
||||
ConfigFile file;
|
||||
root_dir = getRootDirectory().c_str();
|
||||
MemoryPool *pool = getDefaultMemoryPool();
|
||||
int size = sizeof(entries) / sizeof(entries[0]);
|
||||
int size = FB_NELEM(entries);
|
||||
values = FB_NEW(*pool) ConfigValue[size];
|
||||
|
||||
string val_sep = ",";
|
||||
@ -123,9 +123,11 @@ ConfigImpl::ConfigImpl()
|
||||
|
||||
ConfigImpl::~ConfigImpl()
|
||||
{
|
||||
int size = FB_NELEM(entries);
|
||||
|
||||
/* Free allocated memory */
|
||||
|
||||
for (int i = 0; i < sizeof(entries) / sizeof(entries[0]); i++)
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
if (values[i] == entries[i].default_value)
|
||||
continue;
|
||||
|
@ -262,8 +262,6 @@ struct word {
|
||||
{KW_WITH, "WITH"}
|
||||
};
|
||||
|
||||
#define NUMWORDS (sizeof (keywords) / sizeof (struct word))
|
||||
|
||||
|
||||
void HSH_init(void)
|
||||
{
|
||||
@ -280,10 +278,10 @@ void HSH_init(void)
|
||||
**************************************/
|
||||
register SCHAR *string;
|
||||
register SYM symbol;
|
||||
register USHORT i;
|
||||
register int i;
|
||||
register SSHORT length;
|
||||
|
||||
for (i = 0; i < (USHORT)NUMWORDS; i++) {
|
||||
for (i = 0; i < FB_NELEM(keywords); i++) {
|
||||
string = keywords[i].keyword;
|
||||
for (length = 0; string[length] != '\0'; length++);
|
||||
symbol = (SYM) DDL_alloc(SYM_LEN);
|
||||
|
@ -25,7 +25,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: hsh.cpp,v 1.7 2002-11-17 00:04:18 hippoman Exp $
|
||||
// $Id: hsh.cpp,v 1.8 2002-12-02 08:25:16 eku Exp $
|
||||
//
|
||||
|
||||
#include "firebird.h"
|
||||
@ -58,10 +58,6 @@ static struct word {
|
||||
#include "../gpre/hsh.h"
|
||||
};
|
||||
|
||||
#define NUMWORDS (sizeof (keywords) / sizeof (struct word))
|
||||
|
||||
|
||||
|
||||
|
||||
//____________________________________________________________
|
||||
//
|
||||
@ -91,14 +87,14 @@ void HSH_init(void)
|
||||
{
|
||||
register SCHAR *string;
|
||||
register SYM symbol, *ptr;
|
||||
SSHORT i;
|
||||
register int i;
|
||||
register struct word *word;
|
||||
|
||||
for (ptr = hash_table, i = 0; i < HASH_SIZE; i++)
|
||||
*ptr++ = NULL;
|
||||
|
||||
fflush(stdout);
|
||||
for (i = 0, word = keywords; i < (SSHORT)NUMWORDS; i++, word++) {
|
||||
for (i = 0, word = keywords; i < FB_NELEM(keywords); i++, word++) {
|
||||
for (string = word->keyword; *string; string++);
|
||||
symbol = (SYM) ALLOC(SYM_LEN);
|
||||
symbol->sym_type = SYM_keyword;
|
||||
|
@ -27,7 +27,7 @@
|
||||
* Mark O'Donohue <mark.odonohue@ludwig.edu.au>
|
||||
*
|
||||
*
|
||||
* $Id: fb_types.h,v 1.9 2002-11-22 14:09:36 dimitr Exp $
|
||||
* $Id: fb_types.h,v 1.10 2002-12-02 08:25:16 eku Exp $
|
||||
*
|
||||
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "OS/2" port
|
||||
*
|
||||
@ -54,8 +54,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if (defined(__osf__) && defined(__alpha))
|
||||
/* It appears the alpha has a 32 bit int and a 64 bit long. */
|
||||
#if SIZEOF_LONG == 8
|
||||
/* EKU: Firebird requires (S)LONG to be 32 bit */
|
||||
# define LONG_DEFINED
|
||||
typedef int SLONG;
|
||||
typedef unsigned int ULONG;
|
||||
@ -64,8 +64,7 @@
|
||||
typedef long SQUAD;
|
||||
typedef unsigned long UQUAD;
|
||||
# define NATIVE_QUAD
|
||||
|
||||
#endif /* DEC osf */
|
||||
#endif /* SIZEOF_LONG == 8 */
|
||||
|
||||
|
||||
|
||||
@ -152,19 +151,7 @@ typedef ULONG RCRD_OFFSET;
|
||||
typedef USHORT FLD_LENGTH;
|
||||
|
||||
|
||||
#define GDS_TRUE 1
|
||||
#define GDS_FALSE 0
|
||||
|
||||
#if !(defined __cplusplus)
|
||||
#define GDS__TRUE GDS_TRUE
|
||||
#define GDS__FALSE GDS_FALSE
|
||||
#endif
|
||||
|
||||
/* We can remove these three #defines if we change gdsold.h and gen/codes.h */
|
||||
#define GDS_LONG SLONG
|
||||
#define GDS_ULONG ULONG
|
||||
|
||||
#define GDS_STATUS long
|
||||
/* Number of elements in an arry */
|
||||
#define FB_NELEM(x) ((int)(sizeof(x) / sizeof(x[0])))
|
||||
|
||||
#endif /* INCLUDE_FB_TYPES_H */
|
||||
|
||||
|
@ -126,6 +126,7 @@
|
||||
|
||||
/* sizeof(void *) = 8 ==> HAS_64BIT_POINTERS */
|
||||
#define SIZEOF_VOID_P 4
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* Is union semun defined? */
|
||||
#undef HAVE_SEMUN
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
/*
|
||||
$Id: align.cpp,v 1.5 2002-09-17 05:58:35 eku Exp $
|
||||
$Id: align.cpp,v 1.6 2002-12-02 08:25:17 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -75,7 +75,7 @@ int main(argc, argv)
|
||||
#endif
|
||||
{
|
||||
double *p, d1;
|
||||
#if (defined __osf__ && defined __alpha)
|
||||
#if SIZEOF_LONG == 8
|
||||
int vector[3];
|
||||
#else
|
||||
long vector[3];
|
||||
@ -131,7 +131,7 @@ static int check_double()
|
||||
#endif
|
||||
{
|
||||
double *p, d1;
|
||||
#if (defined __osf__ && defined __alpha)
|
||||
#if SIZEOF_LONG == 8
|
||||
int vector[3];
|
||||
#else
|
||||
long vector[3];
|
||||
|
@ -132,31 +132,31 @@ static CONST SCHAR *c_boiler_plate[] = {
|
||||
};
|
||||
|
||||
static CONST SCHAR *cpp_boiler_plate[] = {
|
||||
"const GDS_LONG gds_arg_end = 0; /* end of argument list */",
|
||||
"const GDS_LONG gds_arg_gds = 1; /* generic DSRI status value */",
|
||||
"const GDS_LONG gds_arg_string = 2; /* string argument */",
|
||||
"const GDS_LONG gds_arg_cstring = 3; /* count & string argument */",
|
||||
"const GDS_LONG gds_arg_number = 4; /* numeric argument (long) */",
|
||||
"const GDS_LONG gds_arg_interpreted = 5; /* interpreted status code (string) */",
|
||||
"const GDS_LONG gds_arg_vms = 6; /* VAX/VMS status code (long) */",
|
||||
"const GDS_LONG gds_arg_unix = 7; /* UNIX error code */",
|
||||
"const GDS_LONG gds_arg_domain = 8; /* Apollo/Domain error code */",
|
||||
"const GDS_LONG gds_arg_dos = 9; /* MSDOS/OS2 error code */",
|
||||
"const GDS_LONG gds_arg_mpexl = 10; /* HP MPE/XL error code */",
|
||||
"const GDS_LONG gds_arg_mpexl_ipc = 11; /* HP MPE/XL IPC error code */",
|
||||
"const SLONG gds_arg_end = 0; /* end of argument list */",
|
||||
"const SLONG gds_arg_gds = 1; /* generic DSRI status value */",
|
||||
"const SLONG gds_arg_string = 2; /* string argument */",
|
||||
"const SLONG gds_arg_cstring = 3; /* count & string argument */",
|
||||
"const SLONG gds_arg_number = 4; /* numeric argument (long) */",
|
||||
"const SLONG gds_arg_interpreted = 5; /* interpreted status code (string) */",
|
||||
"const SLONG gds_arg_vms = 6; /* VAX/VMS status code (long) */",
|
||||
"const SLONG gds_arg_unix = 7; /* UNIX error code */",
|
||||
"const SLONG gds_arg_domain = 8; /* Apollo/Domain error code */",
|
||||
"const SLONG gds_arg_dos = 9; /* MSDOS/OS2 error code */",
|
||||
"const SLONG gds_arg_mpexl = 10; /* HP MPE/XL error code */",
|
||||
"const SLONG gds_arg_mpexl_ipc = 11; /* HP MPE/XL IPC error code */",
|
||||
|
||||
#ifdef dontdothis
|
||||
|
||||
/* #'s 12-14 WERE USED BY TWIN SUN AND THUS MUST BE SKIPPED BY US! */
|
||||
|
||||
"const GDS_LONG gds_arg_string2 = 12; /* string argument */",
|
||||
"const GDS_LONG gds_arg_cstring2 = 13; /* count & string argument */",
|
||||
"const GDS_LONG gds_arg_interpreted2 = 14; /* interpreted status code (string) */"
|
||||
"const SLONG gds_arg_string2 = 12; /* string argument */",
|
||||
"const SLONG gds_arg_cstring2 = 13; /* count & string argument */",
|
||||
"const SLONG gds_arg_interpreted2 = 14; /* interpreted status code (string) */"
|
||||
#endif
|
||||
"const GDS_LONG gds_arg_next_mach = 15; /* NeXT/Mach error code */",
|
||||
"const GDS_LONG gds_arg_netware = 16; /* NetWare error code */",
|
||||
"const GDS_LONG gds_arg_win32 = 17; /* Win32 error code */",
|
||||
"const GDS_LONG gds_arg_warning = 18; /* warning argument */",
|
||||
"const SLONG gds_arg_next_mach = 15; /* NeXT/Mach error code */",
|
||||
"const SLONG gds_arg_netware = 16; /* NetWare error code */",
|
||||
"const SLONG gds_arg_win32 = 17; /* Win32 error code */",
|
||||
"const SLONG gds_arg_warning = 18; /* warning argument */",
|
||||
"",
|
||||
};
|
||||
|
||||
@ -441,7 +441,7 @@ static void build_codes_h(void)
|
||||
ib_fprintf(c_codes, "\n#ifdef __cplusplus /* c++ definitions */\n\n");
|
||||
|
||||
ib_fprintf(c_codes,
|
||||
"const GDS_LONG gds_facility = %d;\nconst GDS_LONG gds_err_base = %ldL;\nconst GDS_LONG gds_err_factor = %ld;\n",
|
||||
"const SLONG gds_facility = %d;\nconst SLONG gds_err_base = %ldL;\nconst SLONG gds_err_factor = %ld;\n",
|
||||
gds_facility, (SLONG) gds_base, (SLONG) gds_factor);
|
||||
|
||||
/* Append the C++ boiler plate */
|
||||
@ -463,7 +463,7 @@ static void build_codes_h(void)
|
||||
|
||||
last_code = N.CODE;
|
||||
new_code = ENCODE_ISC_MSG(S.NUMBER, N.FAC_CODE);
|
||||
ib_fprintf(c_codes, "const GDS_LONG gds_%-32.32s = %dL;\n", S.GDS_SYMBOL,
|
||||
ib_fprintf(c_codes, "const SLONG gds_%-32.32s = %dL;\n", S.GDS_SYMBOL,
|
||||
new_code);
|
||||
++code;
|
||||
|
||||
@ -500,7 +500,7 @@ static void build_codes_h(void)
|
||||
END_FOR;
|
||||
|
||||
--code;
|
||||
ib_fprintf(c_codes, "const GDS_LONG gds_%-32.32s = %dL;\n", "err_max", code);
|
||||
ib_fprintf(c_codes, "const SLONG gds_%-32.32s = %dL;\n", "err_max", code);
|
||||
ib_fprintf(c_codes, "\n");
|
||||
|
||||
|
||||
|
196
src/jrd/gdsold.h
196
src/jrd/gdsold.h
@ -39,8 +39,6 @@
|
||||
#define GDS_REF(val) &val
|
||||
#endif
|
||||
|
||||
#define GDS_TYPE GDS_STATUS
|
||||
|
||||
#define CANCEL_disable 1
|
||||
#define CANCEL_enable 2
|
||||
#define CANCEL_raise 3
|
||||
@ -50,7 +48,7 @@
|
||||
/******************************************************************/
|
||||
|
||||
#ifndef GDS_FAR
|
||||
#define GDS_FAR
|
||||
#define GDS_FAR
|
||||
#endif
|
||||
|
||||
|
||||
@ -62,7 +60,7 @@ typedef void GDS_FAR *gds_win_handle;
|
||||
typedef void GDS_FAR *gds_form_handle;
|
||||
typedef void GDS_FAR *gds_stmt_handle;
|
||||
typedef void GDS_FAR *gds_svc_handle;
|
||||
typedef void (GDS_FAR * gds_callback) ();
|
||||
typedef void (GDS_FAR * gds_callback)();
|
||||
|
||||
|
||||
/*************************/
|
||||
@ -85,48 +83,48 @@ typedef GDS_QUAD GDS__QUAD;
|
||||
defined(__cplusplus)
|
||||
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__attach_database(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__attach_database(STATUS GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__blob_info(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__blob_info(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__cancel_blob(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__cancel_blob(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__close_blob(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__close_blob(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__commit_transaction(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__commit_transaction(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__compile_request(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__compile_request(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__compile_request2(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__compile_request2(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__create_blob(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__create_blob(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
GDS__QUAD GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__create_blob2(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__create_blob2(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
@ -134,7 +132,7 @@ GDS_STATUS GDS_EXPORT gds__create_blob2(GDS_STATUS GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__create_database(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__create_database(STATUS GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
@ -142,7 +140,7 @@ GDS_STATUS GDS_EXPORT gds__create_database(GDS_STATUS GDS_FAR *,
|
||||
char GDS_FAR *,
|
||||
short);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__database_info(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__database_info(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
@ -152,24 +150,24 @@ GDS_STATUS GDS_EXPORT gds__database_info(GDS_STATUS GDS_FAR *,
|
||||
void GDS_EXPORT gds__decode_date(GDS__QUAD GDS_FAR *,
|
||||
void GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__detach_database(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__detach_database(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
GDS_ULONG GDS_EXPORT gds__free(void GDS_FAR *);
|
||||
ULONG GDS_EXPORT gds__free(void GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__get_segment(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__get_segment(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
unsigned short GDS_FAR *,
|
||||
unsigned short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__open_blob(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__open_blob(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
GDS__QUAD GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__open_blob2(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__open_blob2(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
@ -177,33 +175,33 @@ GDS_STATUS GDS_EXPORT gds__open_blob2(GDS_STATUS GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__prepare_transaction(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__prepare_transaction(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__prepare_transaction2(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__prepare_transaction2(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__put_segment(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__put_segment(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
unsigned short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__receive(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__receive(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
short,
|
||||
void GDS_FAR *,
|
||||
short);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__reconnect_transaction(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__reconnect_transaction(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__request_info(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__request_info(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
short,
|
||||
@ -211,19 +209,19 @@ GDS_STATUS GDS_EXPORT gds__request_info(GDS_STATUS GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__release_request(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__release_request(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__rollback_transaction(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__rollback_transaction(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__seek_blob(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__seek_blob(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
GDS_LONG,
|
||||
GDS_LONG GDS_FAR *);
|
||||
SLONG,
|
||||
SLONG GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__send(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__send(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
short,
|
||||
@ -232,7 +230,7 @@ GDS_STATUS GDS_EXPORT gds__send(GDS_STATUS GDS_FAR *,
|
||||
|
||||
void GDS_EXPORT gds__set_debug(int);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__start_and_send(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__start_and_send(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
@ -240,32 +238,32 @@ GDS_STATUS GDS_EXPORT gds__start_and_send(GDS_STATUS GDS_FAR *,
|
||||
void GDS_FAR *,
|
||||
short);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__start_multiple(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__start_multiple(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
void GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__start_request(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__start_request(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__start_transaction(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__start_transaction(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short, ...);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__transaction_info(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__transaction_info(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__unwind_request(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__unwind_request(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short);
|
||||
|
||||
GDS_LONG GDS_EXPORT gds__ftof(char GDS_FAR *,
|
||||
SLONG GDS_EXPORT gds__ftof(char GDS_FAR *,
|
||||
unsigned short,
|
||||
char GDS_FAR *,
|
||||
unsigned short);
|
||||
@ -280,35 +278,35 @@ int GDS_EXPORT gds__disable_subsystem(char GDS_FAR *);
|
||||
|
||||
int GDS_EXPORT gds__enable_subsystem(char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__print_status(GDS_STATUS GDS_FAR *);
|
||||
STATUS GDS_EXPORT gds__print_status(STATUS GDS_FAR *);
|
||||
|
||||
GDS_LONG GDS_EXPORT gds__sqlcode(GDS_STATUS GDS_FAR *);
|
||||
SLONG GDS_EXPORT gds__sqlcode(STATUS GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__ddl(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__ddl(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__commit_retaining(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__commit_retaining(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *);
|
||||
|
||||
void GDS_EXPORT gds__encode_date(void GDS_FAR *,
|
||||
GDS__QUAD GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__que_events(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__que_events(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
GDS_LONG GDS_FAR *,
|
||||
SLONG GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
void (GDS_FAR *) (),
|
||||
void GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__cancel_events(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__cancel_events(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
GDS_LONG GDS_FAR *);
|
||||
SLONG GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__event_wait(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__event_wait(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
@ -319,31 +317,31 @@ void GDS_EXPORT gds__event_counts(ULONG GDS_FAR *,
|
||||
char GDS_FAR *,
|
||||
char GDS_FAR *);
|
||||
|
||||
GDS_LONG GDS_EXPORT gds__event_block(char GDS_FAR * GDS_FAR *,
|
||||
SLONG GDS_EXPORT gds__event_block(char GDS_FAR * GDS_FAR *,
|
||||
char GDS_FAR * GDS_FAR *,
|
||||
unsigned short, ...);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__get_slice(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__get_slice(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
GDS__QUAD GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
short,
|
||||
GDS_LONG GDS_FAR *,
|
||||
GDS_LONG,
|
||||
SLONG GDS_FAR *,
|
||||
SLONG,
|
||||
void GDS_FAR *,
|
||||
GDS_LONG GDS_FAR *);
|
||||
SLONG GDS_FAR *);
|
||||
|
||||
GDS_STATUS GDS_EXPORT gds__put_slice(GDS_STATUS GDS_FAR *,
|
||||
STATUS GDS_EXPORT gds__put_slice(STATUS GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
void GDS_FAR * GDS_FAR *,
|
||||
GDS__QUAD GDS_FAR *,
|
||||
short,
|
||||
char GDS_FAR *,
|
||||
short,
|
||||
GDS_LONG GDS_FAR *,
|
||||
GDS_LONG,
|
||||
SLONG GDS_FAR *,
|
||||
SLONG,
|
||||
void GDS_FAR *);
|
||||
|
||||
void GDS_EXPORT gds__vtof(char GDS_FAR *,
|
||||
@ -356,49 +354,49 @@ void GDS_EXPORT gds__vtof(char GDS_FAR *,
|
||||
|
||||
#ifndef _Windows
|
||||
#ifndef _WINDOWS
|
||||
GDS_TYPE GDS_EXPORT gds__attach_database();
|
||||
GDS_TYPE GDS_EXPORT gds__blob_info();
|
||||
GDS_TYPE GDS_EXPORT gds__cancel_blob();
|
||||
GDS_TYPE GDS_EXPORT gds__close_blob();
|
||||
GDS_TYPE GDS_EXPORT gds__commit_transaction();
|
||||
GDS_TYPE GDS_EXPORT gds__compile_request();
|
||||
GDS_TYPE GDS_EXPORT gds__compile_request2();
|
||||
GDS_TYPE GDS_EXPORT gds__create_blob();
|
||||
GDS_TYPE GDS_EXPORT gds__create_blob2();
|
||||
GDS_TYPE GDS_EXPORT gds__create_database();
|
||||
GDS_TYPE GDS_EXPORT gds__database_info();
|
||||
GDS_TYPE GDS_EXPORT gds__detach_database();
|
||||
GDS_TYPE GDS_EXPORT gds__get_segment();
|
||||
GDS_TYPE GDS_EXPORT gds__open_blob();
|
||||
GDS_TYPE GDS_EXPORT gds__open_blob2();
|
||||
GDS_TYPE GDS_EXPORT gds__prepare_transaction();
|
||||
GDS_TYPE GDS_EXPORT gds__prepare_transaction2();
|
||||
GDS_TYPE GDS_EXPORT gds__put_segment();
|
||||
GDS_TYPE GDS_EXPORT gds__receive();
|
||||
GDS_TYPE GDS_EXPORT gds__reconnect_transaction();
|
||||
GDS_TYPE GDS_EXPORT gds__request_info();
|
||||
GDS_TYPE GDS_EXPORT gds__release_request();
|
||||
GDS_TYPE GDS_EXPORT gds__rollback_transaction();
|
||||
GDS_TYPE GDS_EXPORT gds__seek_blob();
|
||||
GDS_TYPE GDS_EXPORT gds__send();
|
||||
GDS_TYPE GDS_EXPORT gds__start_and_send();
|
||||
GDS_TYPE GDS_EXPORT gds__start_multiple();
|
||||
GDS_TYPE GDS_EXPORT gds__start_request();
|
||||
GDS_TYPE GDS_EXPORT gds__start_transaction();
|
||||
GDS_TYPE GDS_EXPORT gds__transaction_info();
|
||||
GDS_TYPE GDS_EXPORT gds__unwind_request();
|
||||
GDS_TYPE GDS_EXPORT gds__ftof();
|
||||
GDS_TYPE GDS_EXPORT gds__print_status();
|
||||
GDS_TYPE GDS_EXPORT gds__sqlcode();
|
||||
GDS_TYPE GDS_EXPORT gds__ddl();
|
||||
GDS_TYPE GDS_EXPORT gds__commit_retaining();
|
||||
GDS_TYPE GDS_EXPORT gds__que_events();
|
||||
GDS_TYPE GDS_EXPORT gds__cancel_events();
|
||||
GDS_TYPE GDS_EXPORT gds__event_wait();
|
||||
GDS_TYPE GDS_EXPORT gds__event_block();
|
||||
GDS_TYPE GDS_EXPORT gds__get_slice();
|
||||
GDS_TYPE GDS_EXPORT gds__put_slice();
|
||||
GDS_TYPE GDS_EXPORT gds__seek_blob();
|
||||
STATUS GDS_EXPORT gds__attach_database();
|
||||
STATUS GDS_EXPORT gds__blob_info();
|
||||
STATUS GDS_EXPORT gds__cancel_blob();
|
||||
STATUS GDS_EXPORT gds__close_blob();
|
||||
STATUS GDS_EXPORT gds__commit_transaction();
|
||||
STATUS GDS_EXPORT gds__compile_request();
|
||||
STATUS GDS_EXPORT gds__compile_request2();
|
||||
STATUS GDS_EXPORT gds__create_blob();
|
||||
STATUS GDS_EXPORT gds__create_blob2();
|
||||
STATUS GDS_EXPORT gds__create_database();
|
||||
STATUS GDS_EXPORT gds__database_info();
|
||||
STATUS GDS_EXPORT gds__detach_database();
|
||||
STATUS GDS_EXPORT gds__get_segment();
|
||||
STATUS GDS_EXPORT gds__open_blob();
|
||||
STATUS GDS_EXPORT gds__open_blob2();
|
||||
STATUS GDS_EXPORT gds__prepare_transaction();
|
||||
STATUS GDS_EXPORT gds__prepare_transaction2();
|
||||
STATUS GDS_EXPORT gds__put_segment();
|
||||
STATUS GDS_EXPORT gds__receive();
|
||||
STATUS GDS_EXPORT gds__reconnect_transaction();
|
||||
STATUS GDS_EXPORT gds__request_info();
|
||||
STATUS GDS_EXPORT gds__release_request();
|
||||
STATUS GDS_EXPORT gds__rollback_transaction();
|
||||
STATUS GDS_EXPORT gds__seek_blob();
|
||||
STATUS GDS_EXPORT gds__send();
|
||||
STATUS GDS_EXPORT gds__start_and_send();
|
||||
STATUS GDS_EXPORT gds__start_multiple();
|
||||
STATUS GDS_EXPORT gds__start_request();
|
||||
STATUS GDS_EXPORT gds__start_transaction();
|
||||
STATUS GDS_EXPORT gds__transaction_info();
|
||||
STATUS GDS_EXPORT gds__unwind_request();
|
||||
STATUS GDS_EXPORT gds__ftof();
|
||||
STATUS GDS_EXPORT gds__print_status();
|
||||
STATUS GDS_EXPORT gds__sqlcode();
|
||||
STATUS GDS_EXPORT gds__ddl();
|
||||
STATUS GDS_EXPORT gds__commit_retaining();
|
||||
STATUS GDS_EXPORT gds__que_events();
|
||||
STATUS GDS_EXPORT gds__cancel_events();
|
||||
STATUS GDS_EXPORT gds__event_wait();
|
||||
STATUS GDS_EXPORT gds__event_block();
|
||||
STATUS GDS_EXPORT gds__get_slice();
|
||||
STATUS GDS_EXPORT gds__put_slice();
|
||||
STATUS GDS_EXPORT gds__seek_blob();
|
||||
|
||||
void GDS_EXPORT gds__event_counts();
|
||||
void GDS_EXPORT gds__set_debug();
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: ibase.h,v 1.17 2002-11-17 16:21:41 dimitr Exp $
|
||||
$Id: ibase.h,v 1.18 2002-12-02 08:25:17 eku Exp $
|
||||
*/
|
||||
|
||||
#ifndef JRD_IBASE_H
|
||||
@ -51,7 +51,7 @@ $Id: ibase.h,v 1.17 2002-11-17 16:21:41 dimitr Exp $
|
||||
#define ISC__FALSE ISC_FALSE
|
||||
#endif
|
||||
|
||||
#if (defined __osf__ && defined __alpha)
|
||||
#if SIZEOF_LONG == 8
|
||||
#define ISC_LONG int
|
||||
#define ISC_ULONG unsigned int
|
||||
#else
|
||||
|
@ -187,8 +187,6 @@ static void* intl_back_compat_alloc_func_lookup(USHORT, CHARSET_ID, CHARSET_ID);
|
||||
static void* intl_back_compat_obj_init_lookup(USHORT, SSHORT, SSHORT);
|
||||
|
||||
|
||||
#define NUM_ELEMENTS(x) (sizeof ((x))/sizeof ((x)[0]))
|
||||
|
||||
/* Name of module that implements text-type (n) */
|
||||
|
||||
#ifdef VMS
|
||||
|
@ -29,8 +29,6 @@
|
||||
#include "../jrd/sym_proto.h"
|
||||
#include "../jrd/thd_proto.h"
|
||||
|
||||
#define NUMWORDS (sizeof (keywords) / sizeof (struct word))
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: lock.cpp,v 1.24 2002-11-14 08:25:29 dimitr Exp $
|
||||
$Id: lock.cpp,v 1.25 2002-12-02 08:25:18 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -341,7 +341,7 @@ static struct ipccfg LOCK_hdrtbl[] =
|
||||
#define OWN_BLOCK_dummy 3
|
||||
|
||||
#ifndef LOCK_MANAGER
|
||||
#define LOCK_MANAGER "bin/gds_lock_mgr"
|
||||
#define LOCK_MANAGER "bin/fb_lock_mgr"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ident "$Id: config.h.in,v 1.61 2002-11-21 08:56:28 eku Exp $"
|
||||
#ident "$Id: config.h.in,v 1.62 2002-12-02 08:25:18 eku Exp $"
|
||||
|
||||
/*
|
||||
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
||||
@ -108,6 +108,7 @@
|
||||
|
||||
/* sizeof(void *) = 8 ==> HAS_64BIT_POINTERS */
|
||||
#define SIZEOF_VOID_P 4
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* Is union semun defined? */
|
||||
#undef HAVE_SEMUN
|
||||
|
@ -48,8 +48,6 @@ struct word {
|
||||
{KW_continuation, "-\n"}
|
||||
};
|
||||
|
||||
#define NUMWORDS (sizeof (keywords) / sizeof (struct word))
|
||||
|
||||
|
||||
void HSH_fini(void)
|
||||
{
|
||||
@ -89,10 +87,10 @@ void HSH_init(void)
|
||||
**************************************/
|
||||
register SCHAR *string;
|
||||
register SYM symbol;
|
||||
register SSHORT i;
|
||||
register int i;
|
||||
struct word *word;
|
||||
|
||||
for (i = 0, word = keywords; i < (SSHORT)NUMWORDS; i++, word++) {
|
||||
for (i = 0, word = keywords; i < FB_NELEM(keywords); i++, word++) {
|
||||
for (string = word->keyword; *string; string++);
|
||||
symbol = (SYM) ALLOCPV(type_sym, 0);
|
||||
symbol->sym_type = SYM_keyword;
|
||||
|
@ -17,12 +17,12 @@ int main(int argc, char **argv)
|
||||
printf("Usage: %s <new db name>\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
d = dpb;
|
||||
*d++ = (UCHAR) isc_dpb_version1;
|
||||
*d++ = (UCHAR) isc_dpb_set_db_readonly;
|
||||
*d++ = 1;
|
||||
*d++ = GDS_TRUE;
|
||||
*d++ = TRUE;
|
||||
len = d - dpb;
|
||||
|
||||
isc_create_database(sv, 0, argv[1], &db, 0, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user