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

More status vector cleanups (ISC_STATUS_LENGTH).

Autoconf checks for xdr_hyper.
This commit is contained in:
eku 2002-11-04 13:57:18 +00:00
parent 8f690e0bce
commit 9fcdb74685
13 changed files with 27 additions and 30 deletions

View File

@ -1,4 +1,4 @@
dnl $Id: configure.in,v 1.59 2002-11-04 08:07:23 eku Exp $
dnl $Id: configure.in,v 1.60 2002-11-04 13:57:08 eku Exp $
dnl ############################# INITIALISATION ###############################
@ -222,6 +222,7 @@ AC_FUNC_SETPGRP
AC_CHECK_FUNCS(flock)
AC_CHECK_FUNCS(initgroups)
AC_CHECK_FUNCS(getpagesize)
AC_CHECK_FUNCS(xdr_hyper)
dnl Check for other things

View File

@ -28,7 +28,7 @@
*
*/
/*
$Id: canonical.cpp,v 1.8 2002-10-31 05:05:53 seanleyne Exp $
$Id: canonical.cpp,v 1.9 2002-11-04 13:57:09 eku Exp $
*/
#include "firebird.h"
@ -71,7 +71,7 @@ static bool_t xdr_quad(register XDR*, register SLONG*);
static int xdr_init(XDR*, LSTRING*, enum xdr_op);
static bool_t xdr_slice(XDR*, LSTRING*, USHORT, UCHAR*);
#ifdef PLATFORM_SUPPLIES_XDR_HYPER
#ifdef HAVE_XDR_HYPER
extern bool_t xdr_hyper(register XDR *, SINT64 *);
#else
static bool_t xdr_hyper(register XDR *, SINT64 *);
@ -937,7 +937,7 @@ static bool_t xdr_slice(XDR* xdrs,
}
#ifndef PLATFORM_SUPPLIES_XDR_HYPER
#ifndef HAVE_XDR_HYPER
static bool_t xdr_hyper(register XDR* xdrs, SINT64* pi64)
{
/**************************************

View File

@ -2950,7 +2950,7 @@ USHORT buffer_length, UCHAR * buffer, USHORT * return_length)
p = error_buffer;
for (status = user_status, end = status + 20, stuff =
for (status = user_status, end = status + ISC_STATUS_LENGTH, stuff =
message->msg_resp_status; (*status = *stuff++) && status < end;)
switch (*status++) {
case gds_arg_interpreted:

View File

@ -21,7 +21,7 @@
* Contributor(s): ______________________________________.
*/
/*
$Id: csv.cpp,v 1.5 2002-10-24 09:01:25 eku Exp $
$Id: csv.cpp,v 1.6 2002-11-04 13:57:10 eku Exp $
*/
#include "firebird.h"
@ -2627,7 +2627,7 @@ static int send_response(
if (!status_vector[1])
status_vector[2] = gds_arg_end;
else
for (status = status_vector; *status && status < status_vector + 20;)
for (status = status_vector; *status && status < status_vector + ISC_STATUS_LENGTH;)
switch (*status++) {
case gds_arg_interpreted:
case gds_arg_string:
@ -2665,7 +2665,7 @@ static int send_response(
/* Start by translating the status vector into "generic" form */
for (status = status_vector, target = message->msg_resp_status;
(*target++ = *status) && status < status_vector + 20;)
(*target++ = *status) && status < status_vector + ISC_STATUS_LENGTH;)
switch (*status++) {
case gds_arg_interpreted:
case gds_arg_string:

View File

@ -283,7 +283,7 @@ void HSH_init(void)
register USHORT i;
register SSHORT length;
for (i = 0; i < NUMWORDS; i++) {
for (i = 0; i < (USHORT)NUMWORDS; i++) {
string = keywords[i].keyword;
for (length = 0; string[length] != '\0'; length++);
symbol = (SYM) DDL_alloc(SYM_LEN);

View File

@ -90,6 +90,7 @@
#undef HAVE_FLOCK
#undef HAVE_INITGROUPS
#undef HAVE_GETPAGESIZE
#undef HAVE_XDR_HYPER
/* Types */
#undef socklen_t

View File

@ -49,7 +49,7 @@
*
*/
/*
$Id: common.h,v 1.44 2002-10-31 05:05:56 seanleyne Exp $
$Id: common.h,v 1.45 2002-11-04 13:57:10 eku Exp $
*/
#ifndef JRD_COMMON_H
@ -337,10 +337,6 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
#ifndef SFIO
#define NEED_IB_STDIO
#endif
/* Define the following macro only on platforms which supply the library
routine xdr_hyper. For other platforms, omit the definition of this
macro, and we will supply that function where we need it. */
#define PLATFORM_SUPPLIES_XDR_HYPER
#ifdef SOLX86
#define LSEEK_OFFSET_CAST (off_t)

View File

@ -55,7 +55,7 @@ void IBERR_append_status(STATUS * status_vector, STATUS status, ...)
/* Now find the end of the passed status vector info */
for (status_end = status_vector + 20; *status_vector; status_vector++);
for (status_end = status_vector + ISC_STATUS_LENGTH; *status_vector; status_vector++);
/* Now append the newly built local status vector to the passed one */

View File

@ -1,4 +1,4 @@
#ident "$Id: config.h.in,v 1.42 2002-10-31 05:05:58 seanleyne Exp $"
#ident "$Id: config.h.in,v 1.43 2002-11-04 13:57:11 eku Exp $"
/*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
@ -71,6 +71,7 @@
#undef HAVE_FLOCK
#undef HAVE_INITGROUPS
#undef HAVE_GETPAGESIZE
#undef HAVE_XDR_HYPER
/* Types */
#undef socklen_t

View File

@ -92,7 +92,7 @@ void HSH_init(void)
register SSHORT i;
struct word *word;
for (i = 0, word = keywords; i < NUMWORDS; i++, word++) {
for (i = 0, word = keywords; i < (SSHORT)NUMWORDS; i++, word++) {
for (string = word->keyword; *string; string++);
symbol = (SYM) ALLOCPV(type_sym, 0);
symbol->sym_type = SYM_keyword;

View File

@ -55,7 +55,6 @@ void ShowErrDlg(int, char *, HWND);
// Symbolic constant definitions
#define PASSWORD_LEN 33 // MAXIMUM PASSWORD LENGTH DEFINITION
#define TEMP_BUFLEN 33
#define STATUS_BUFLEN 20
#define SEND_BUFLEN 32
#define RESP_BUFLEN 128
@ -317,7 +316,7 @@ BOOL ReadIBSettings(HWND hDlg)
*****************************************************************************/
BOOL bSuccess;
char pchTmp[TEMP_BUFLEN];
long pdwStatus[STATUS_BUFLEN];
STATUS pdwStatus[ISC_STATUS_LENGTH];
isc_svc_handle hService = NULL;
char pchRcvBuf[SEND_BUFLEN], pchResBuf[RESP_BUFLEN];
char *pchPtr;
@ -470,7 +469,7 @@ BOOL WriteIBSettings(HWND hDlg)
* Description: This method calls the ISC_set_config() function to write the
* current OS settings in the config file.
*****************************************************************************/
long pdwStatus[STATUS_BUFLEN];
STATUS pdwStatus[ISC_STATUS_LENGTH];
isc_svc_handle hService = NULL;
char pchSendBuf[SEND_BUFLEN];
char *pchPtr;
@ -637,7 +636,7 @@ BOOL CALLBACK PasswordDlgProc(HWND hDlg, UINT unMsg, WPARAM wParam,
case WM_COMMAND:
if (wParam == IDOK) {
char szPassword[PASSWORD_LEN];
long pdwStatus[STATUS_BUFLEN];
STATUS pdwStatus[ISC_STATUS_LENGTH];
isc_svc_handle hService = NULL;
char szSpb[SPB_BUFLEN];
HCURSOR hOldCursor = NULL;

View File

@ -6281,7 +6281,7 @@ static void move_error( STATUS status, ...)
trdb = GET_THREAD_DATA;
p_args = trdb->trdb_status_vector;
end_args = p_args + 20;
end_args = p_args + ISC_STATUS_LENGTH;
*p_args++ = gds_arg_gds;
*p_args++ = gds_random;

View File

@ -20,7 +20,7 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* $Id: srvrmgr.cpp,v 1.8 2002-11-04 11:19:19 eku Exp $
* $Id: srvrmgr.cpp,v 1.9 2002-11-04 13:57:12 eku Exp $
*/
#include "firebird.h"
@ -53,7 +53,6 @@
#define STUFF_WORD(p, value) {*p++ = value; *p++ = value >> 8;}
#define STATUS_BUFLEN 20 /* status vector length */
#define SPB_BUFLEN 128 /* service params buffer length */
#define SEND_BUFLEN 32 /* length of send and resp */
#define RESP_BUFLEN 128 /* used by isc_service_query */
@ -314,7 +313,7 @@ static BOOLEAN attach_service( IBMGR_DATA * data)
* service depending on thr user name.
*
**************************************/
STATUS status[STATUS_BUFLEN];
STATUS status[ISC_STATUS_LENGTH];
TEXT spb[SPB_BUFLEN], *p;
TEXT svc_name[128];
@ -376,7 +375,7 @@ static BOOLEAN detach_service( IBMGR_DATA * data)
* before, shutdowns the server.
*
**************************************/
STATUS status[STATUS_BUFLEN];
STATUS status[ISC_STATUS_LENGTH];
/* We should be attached if we want to detach
*/
@ -413,7 +412,7 @@ static BOOLEAN start_shutdown( IBMGR_DATA * data)
* Initiate shutdown process
*
**************************************/
STATUS status[STATUS_BUFLEN];
STATUS status[ISC_STATUS_LENGTH];
char sendbuf[SEND_BUFLEN];
char respbuf[2];
@ -563,7 +562,7 @@ static BOOLEAN server_is_ok( IBMGR_DATA * data)
* security database.
*
**************************************/
STATUS status[STATUS_BUFLEN];
STATUS status[ISC_STATUS_LENGTH];
TEXT path[MAXPATHLEN];
TEXT db_name[128];
isc_db_handle db_handle = 0L;
@ -607,7 +606,7 @@ static BOOLEAN server_is_up( IBMGR_DATA * data)
* trying to attach to "anonymous" service.
*
**************************************/
STATUS status[STATUS_BUFLEN];
STATUS status[ISC_STATUS_LENGTH];
TEXT svc_name[128];
isc_svc_handle svc_handle = NULL;
BOOLEAN up;
@ -658,7 +657,7 @@ static BOOLEAN print_pool( IBMGR_DATA * data)
* Make the server print memory pools
*
**************************************/
STATUS status[STATUS_BUFLEN];
STATUS status[ISC_STATUS_LENGTH];
char *sptr, sendbuf[512];
USHORT path_length;
char respbuf[2];