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

Code cleanup of obsolete Apollo port(s)

This commit is contained in:
seanleyne 2002-02-16 04:36:05 +00:00
parent 3997a48218
commit 142ded1aba
10 changed files with 99 additions and 125 deletions

View File

@ -19,21 +19,24 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*
*/
#ifndef ALICE_INFO_H
#define ALICE_INFO_H
static UCHAR info[] =
{
{
gds_info_version,
gds_info_implementation,
gds_info_end
};
/* this table describes the implementations that
require a node_name,protocol combination be
/* this table describes the implementations that
require a node_name,protocol combination be
generated */
static BOOLEAN generate_protocol[] =
@ -60,7 +63,6 @@ static BOOLEAN generate_protocol[] =
#define DECNET_PROTOCOL 1 /* :: */
#define TCP_PROTOCOL 2 /* : */
#define VMS_TCP_PROTOCOL 4 /* ^ */
#define APOLLO_PROTOCOL 8 /* // */
#define MSLAN_PROTOCOL 16 /* \\ */
static USHORT protocols_supported[] =
@ -75,11 +77,11 @@ static USHORT protocols_supported[] =
DECNET_PROTOCOL | VMS_TCP_PROTOCOL, /* "JSV" */
0,
0,
TCP_PROTOCOL | APOLLO_PROTOCOL, /* "InterBase/apollo" */
0,
DECNET_PROTOCOL | TCP_PROTOCOL, /* "InterBase/ultrix" */
DECNET_PROTOCOL | VMS_TCP_PROTOCOL, /* "InterBase/vms" */
TCP_PROTOCOL, /* "InterBase/sun" */
TCP_PROTOCOL, /* "InterBase/OS2" */
0,
0, /* 15 */
0, /* 16 */
0, /* 17 */
@ -90,18 +92,18 @@ static USHORT protocols_supported[] =
0, /* 22 */
0, /* 23 */
0, /* 24 */
TCP_PROTOCOL | APOLLO_PROTOCOL, /* "InterBase/apollo" */
0,
DECNET_PROTOCOL | TCP_PROTOCOL, /* "InterBase/ultrix" */
DECNET_PROTOCOL | VMS_TCP_PROTOCOL, /* "InterBase/vms" */
TCP_PROTOCOL, /* "InterBase/sun" */
TCP_PROTOCOL, /* "InterBase/OS2" */
0, /* "InterBase/OS2" */
TCP_PROTOCOL, /* "InterBase/sun4" */
TCP_PROTOCOL, /* "InterBase/hpux" */
TCP_PROTOCOL, /* "InterBase/sun386" */
DECNET_PROTOCOL | VMS_TCP_PROTOCOL, /* "InterBase:ORACLE/vms" */
TCP_PROTOCOL, /* "InterBase/mac/aux" */
0, /* "InterBase/mac/aux" */
TCP_PROTOCOL, /* "InterBase/ibm/rt" */
DECNET_PROTOCOL | TCP_PROTOCOL, /* "InterBase/mips/ultrix" */
};
#endif /* ALICE_INFO_H */
#endif /* ALICE_INFO_H */

View File

@ -1,30 +1,32 @@
//____________________________________________________________
//
//
// PROGRAM: Alice (All Else) Utility
// MODULE: tdr.cpp
// DESCRIPTION: Routines for automated transaction recovery
//
//
// The contents of this file are subject to the Interbase Public
// License Version 1.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.Inprise.com/IPL.html
//
//
// Software distributed under the License is distributed on an
// "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
// or implied. See the License for the specific language governing
// rights and limitations under the License.
//
//
// The Original Code was created by Inprise Corporation
// and its predecessors. Portions created by Inprise Corporation are
// Copyright (C) Inprise Corporation.
//
//
// All Rights Reserved.
// Contributor(s): ______________________________________.
//
//
//
//____________________________________________________________
//
// $Id: tdr.cpp,v 1.4 2001-12-24 02:50:47 tamlin Exp $
// $Id: tdr.cpp,v 1.5 2002-02-16 04:36:03 seanleyne Exp $
//
// 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
//
#include "firebird.h"
@ -65,7 +67,7 @@ static UCHAR limbo_info[] = { gds_info_limbo, gds_info_end };
//
//
// The following routines are shared by the command line gfix and
// the windows server manager. These routines should not contain
// any direct screen I/O (i.e. ib_printf/ib_getc statements).
@ -73,11 +75,11 @@ static UCHAR limbo_info[] = { gds_info_limbo, gds_info_end };
//____________________________________________________________
//
//
// Determine the proper action to take
// based on the state of the various
// transactions.
//
//
USHORT TDR_analyze(TDR trans)
{
@ -87,7 +89,7 @@ USHORT TDR_analyze(TDR trans)
return TRA_none;
// if the tdr for the first transaction is missing,
// we can assume it was committed
// we can assume it was committed
state = trans->tdr_state;
if (state == TRA_none)
@ -113,7 +115,7 @@ USHORT TDR_analyze(TDR trans)
// a prepared transaction requires a commit if there are missing
// records up to now, otherwise only do something if somebody else
// already has
// already has
case TRA_limbo:
if (state == TRA_none)
@ -125,7 +127,7 @@ USHORT TDR_analyze(TDR trans)
break;
// an explicitly rolled back transaction requires a rollback unless a
// transaction has committed or is assumed committed
// transaction has committed or is assumed committed
case TRA_rollback:
if ((state == TRA_commit) || (state == TRA_none)) {
@ -141,7 +143,7 @@ USHORT TDR_analyze(TDR trans)
// a missing TDR indicates a committed transaction if a limbo one hasn't
// been found yet, otherwise it implies that the transaction wasn't
// prepared
// prepared
case TRA_none:
if (state == TRA_commit)
@ -171,9 +173,9 @@ USHORT TDR_analyze(TDR trans)
//____________________________________________________________
//
//
// Attempt to attach a database with a given pathname.
//
//
BOOLEAN TDR_attach_database(STATUS * status_vector,
TDR trans, TEXT * pathname)
@ -254,10 +256,10 @@ BOOLEAN TDR_attach_database(STATUS * status_vector,
//____________________________________________________________
//
//
// Get the state of the various transactions
// in a multidatabase transaction.
//
//
void TDR_get_states(TDR trans)
{
@ -271,10 +273,10 @@ void TDR_get_states(TDR trans)
//____________________________________________________________
//
//
// Detach all databases associated with
// a multidatabase transaction.
//
//
void TDR_shutdown_databases(TDR trans)
{
@ -290,17 +292,17 @@ void TDR_shutdown_databases(TDR trans)
#ifndef GUI_TOOLS
//
// The following routines are only for the command line utility.
//
// The following routines are only for the command line utility.
// This should really be split into two files...
//
//
//____________________________________________________________
//
//
// List transaction stuck in limbo. If the prompt switch is set,
// prompt for commit, rollback, or leave well enough alone.
//
//
void TDR_list_limbo(int *handle, TEXT * name, ULONG switches)
{
@ -384,16 +386,16 @@ void TDR_list_limbo(int *handle, TEXT * name, ULONG switches)
//____________________________________________________________
//
//
// Check a transaction's TDR to see if it is
// a multi-database transaction. If so, commit
// or rollback according to the user's wishes.
// Object strongly if the transaction is in a
// state that would seem to preclude committing
// or rolling back, but essentially do what the
// user wants. Intelligence is assumed for the
// state that would seem to preclude committing
// or rolling back, but essentially do what the
// user wants. Intelligence is assumed for the
// gfix user.
//
//
BOOLEAN TDR_reconnect_multiple(int *handle,
SLONG id, TEXT * name, ULONG switches)
@ -403,7 +405,7 @@ BOOLEAN TDR_reconnect_multiple(int *handle,
USHORT advice;
BOOLEAN error = FALSE;
// get the state of all the associated transactions
// get the state of all the associated transactions
if (!(trans = MET_get_transaction(status_vector, handle, id)))
return reconnect(handle, id, name, switches);
@ -412,7 +414,7 @@ BOOLEAN TDR_reconnect_multiple(int *handle,
TDR_get_states(trans);
// analyze what to do with them; if the advice contradicts the user's
// desire, make them confirm it; otherwise go with the flow.
// desire, make them confirm it; otherwise go with the flow.
advice = TDR_analyze(trans);
@ -505,7 +507,7 @@ BOOLEAN TDR_reconnect_multiple(int *handle,
error = TRUE;
}
// shutdown all the databases for cleanliness' sake
// shutdown all the databases for cleanliness' sake
TDR_shutdown_databases(trans);
@ -515,11 +517,11 @@ BOOLEAN TDR_reconnect_multiple(int *handle,
//____________________________________________________________
//
//
// format and print description of a transaction in
// limbo, including all associated transactions
// in other databases.
//
//
static void print_description(TDR trans)
{
@ -679,7 +681,7 @@ static void print_description(TDR trans)
}
// let the user know what the suggested action is
// let the user know what the suggested action is
switch (TDR_analyze(trans))
{
@ -716,9 +718,9 @@ static void print_description(TDR trans)
//____________________________________________________________
//
//
// Ask the user whether to commit or rollback.
//
//
static ULONG ask(void)
{
@ -759,10 +761,10 @@ static ULONG ask(void)
//____________________________________________________________
//
// Generate pathnames for a given database
//
// Generate pathnames for a given database
// until the database is successfully attached.
//
//
static void reattach_database(TDR trans)
{
@ -774,7 +776,7 @@ static void reattach_database(TDR trans)
tdgbl = GET_THREAD_DATA;
// determine what protocols are allowable for this OS
// determine what protocols are allowable for this OS
#ifdef VMS
protocols |= DECNET_PROTOCOL | VMS_TCP_PROTOCOL;
@ -788,28 +790,11 @@ static void reattach_database(TDR trans)
ISC_get_host(reinterpret_cast < char *>(buffer), sizeof(buffer));
// if this is being run from the same host,
// (or if this is apollo land), just
// try to reconnect using the same pathname
if ((protocols & APOLLO_PROTOCOL) ||
!strcmp(reinterpret_cast < const char *>(buffer),
reinterpret_cast <
const char *>(trans->tdr_host_site->str_data)))
{
if (TDR_attach_database(status_vector,
trans,
reinterpret_cast<char*>(trans->tdr_fullpath->str_data)))
{
return;
}
}
// try going through the previous host with all available
// protocols, using chaining to try the same method of
// attachment originally used from that host
// attachment originally used from that host
else if (trans->tdr_host_site) {
if (trans->tdr_host_site) {
for (p = buffer, q = trans->tdr_host_site->str_data; *q;)
*p++ = *q++;
start = p;
@ -850,7 +835,7 @@ static void reattach_database(TDR trans)
}
// attaching using the old method didn't work;
// try attaching to the remote node directly
// try attaching to the remote node directly
if (trans->tdr_remote_site) {
for (p = buffer, q = trans->tdr_remote_site->str_data; *q;)
@ -908,7 +893,7 @@ static void reattach_database(TDR trans)
}
// we have failed to reattach; notify the user
// and let them try to succeed where we have failed
// and let them try to succeed where we have failed
ALICE_print(86, reinterpret_cast < char *>(trans->tdr_id), 0, 0, 0, 0); /* msg 86: Could not reattach to database for transaction %ld. */
ALICE_print(87, reinterpret_cast < char *>(trans->tdr_fullpath->str_data),
@ -943,10 +928,10 @@ static void reattach_database(TDR trans)
//____________________________________________________________
//
// Attempt to locate all databases used in
//
// Attempt to locate all databases used in
// a multidatabase transaction.
//
//
static void reattach_databases(TDR trans)
{
@ -959,9 +944,9 @@ static void reattach_databases(TDR trans)
//____________________________________________________________
//
//
// Commit or rollback a named transaction.
//
//
static BOOLEAN reconnect(int *handle,
SLONG number, TEXT * name, ULONG switches)
@ -975,7 +960,7 @@ static BOOLEAN reconnect(int *handle,
if (gds__reconnect_transaction(status_vector,
reinterpret_cast <
void **>(GDS_REF(handle)),
reinterpret_cast <void **>(GDS_REF(transaction)),
reinterpret_cast <void **>(GDS_REF(transaction)),
sizeof(id),
reinterpret_cast <char *>(GDS_REF(id)))) {
ALICE_print(90, name, 0, 0, 0, 0); /* msg 90: failed to reconnect to a transaction in database %s */
@ -1008,4 +993,4 @@ static BOOLEAN reconnect(int *handle,
return FALSE;
}
#endif /* GUI_TOOLS */
#endif /* GUI_TOOLS */

View File

@ -8,6 +8,7 @@
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "M88K" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Cray" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "OS/2" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*/
#ifndef AUTOCONFIG_H
@ -64,7 +65,6 @@
#undef LINUX
#undef FREEBSD
#undef NETBSD
#undef apollo
#undef sun
#undef SOLARIS
#undef hpux

View File

@ -3,19 +3,19 @@
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
*
* The content of this file was generated by the Firebird project
* using the program jrd/codes.epp
*/
/*
*
*
* *** WARNING *** - This file is automatically generated by codes.e - do not edit!
*
*
*/
#ifndef _JRD_GEN_CODES_H
@ -34,7 +34,6 @@ 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 */

View File

@ -26,6 +26,9 @@
/* define LIKE_JRD to have the lookup follow exactly the syntax
* used by intl.c in JRD.
* Set the static full_debug to 1 to turn on ib_printf debugging.
*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*
*/
#include "firebird.h"
@ -53,14 +56,6 @@ typedef unsigned short SHORT;
#define INTL_MODULE "lib/IBLD_%03d"
#endif
#ifdef AX
#define APOLLO
#endif
#ifdef AP
#define APOLLO
#endif
#ifndef INTL_INIT_ENTRY
#define INTL_INIT_ENTRY "ld_init"
#endif
@ -126,12 +121,6 @@ main(argc, argv)
ib_printf("path=%s entry=%s\n", path, entry);
func = (FPTR_INT) ISC_lookup_entrypoint(path, entry, NULL);
}
#else
#if (defined( AP ) || defined( AX ) || defined( APOLLO ))
sprintf(buffer2, "ld%03d_init", atoi(vector[i]));
FULL_DEBUG("looking for %s\n", buffer2);
func = (FPTR_INT) ISC_lookup_entrypoint("", buffer2, NULL);
FULL_DEBUG("found %ld\n", func);
#else
if (strcmp(vector[i], "ask") == 0) {
gets(buffer);
@ -140,7 +129,6 @@ main(argc, argv)
else
func =
(FPTR_INT) ISC_lookup_entrypoint(vector[i], "ld_init", NULL);
#endif
#endif
if (func == NULL)
ib_printf("Cannot find %s.init\n", vector[i]);
@ -182,4 +170,4 @@ main(argc, argv)
};
};
return (0);
}
}

View File

@ -26,6 +26,7 @@
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "NCR3000" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "M88K" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "HP9000 s300" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*
*/
@ -46,6 +47,7 @@
* conditionals, second attempt
*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "MAC" and "MAC_CP" defines
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*
*/
@ -128,11 +130,6 @@ static BOOLEAN find_type(SLONG, WIN *, PAG *, USHORT, USHORT, UCHAR **,
*/
// TMN: Left the APOLLO stuff commented out for historical reference. :-)
//#ifdef APOLLO
//#define CLASS 1
//#endif
#ifdef sun
#ifdef i386
#define CLASS 3

View File

@ -19,12 +19,14 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*
*/
#ifndef _JRD_TERMTYPE_H_
#define _JRD_TERMTYPE_H_
#define TERM_apollo_dm 1
#define TERM_rlogin 2
#define TERM_telnet 3
#define TERM_sio 4
@ -32,4 +34,4 @@
#define TERM_server 6
#define TERM_file 7
#endif /* _JRD_TERMTYPE_H_ */
#endif /* _JRD_TERMTYPE_H_ */

View File

@ -21,6 +21,7 @@
* Contributor(s): ______________________________________.
*
* 2002.02.15 Sean Leyne - Code Cleanup is required of obsolete "EPSON", "XENIX" ports
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*
*/
@ -201,11 +202,11 @@ static const TEXT *const impl_class[] = {
"JSV", /* 7 */
NULL, /* 8 */
NULL, /* 9 */
"InterBase/apollo", /* 10 */
NULL, /* "InterBase/apollo", /* 10 */
"InterBase/ultrix", /* 11 */
"InterBase/vms", /* 12 */
"InterBase/sun", /* 13 */
"InterBase/OS2", /* 14 */
NULL, /* "InterBase/OS2", /* 14 */
NULL, /* 15 */
NULL, /* 16 */
NULL, /* 17 */
@ -216,39 +217,39 @@ static const TEXT *const impl_class[] = {
NULL, /* 22 */
NULL, /* 23 */
NULL, /* 24 */
"InterBase/apollo", /* 25 */
NULL, /* "InterBase/apollo", /* 25 */
"InterBase/ultrix", /* 26 */
"InterBase/vms", /* 27 */
"InterBase/sun", /* 28 */
"InterBase/OS2", /* 29 */
NULL, /* "InterBase/OS2", /* 29 */
"InterBase/sun4", /* 30 */
"InterBase/hpux800", /* 31 */
"InterBase/sun386", /* 32 */
"InterBase:ORACLE/vms", /* 33 */
"InterBase/mac/aux", /* 34 */
NULL, /* "InterBase/mac/aux", /* 34 */
"InterBase/ibm/aix", /* 35 */
"InterBase/mips/ultrix", /* 36 */
"InterBase/xenix", /* 37 */
NULL, /* "InterBase/xenix", /* 37 */
"InterBase/AViiON", /* 38 */
"InterBase/hp/mpexl", /* 39 */
"InterBase/hp/ux300", /* 40 */
"InterBase/sgi", /* 41 */
"InterBase/sco/unix", /* 42 */
"InterBase/Cray", /* 43 */
"InterBase/imp", /* 44 */
"InterBase/delta", /* 45 */
"InterBase/NeXT", /* 46 */
NULL, /* "InterBase/Cray", /* 43 */
NULL, /* "InterBase/imp", /* 44 */
NULL, /* "InterBase/delta", /* 45 */
NULL, /* "InterBase/NeXT", /* 46 */
"InterBase/DOS", /* 47 */
"InterBase/m88k", /* 48 */
NULL, /* "InterBase/m88k", /* 48 */
"InterBase/UNIXWARE", /* 49 */
"InterBase/x86/Windows NT", /* 50 */
"InterBase/epson", /* 51 */
NULL, /* "InterBase/epson", /* 51 */
"InterBase/DEC/OSF", /* 52 */
"InterBase/Alpha/OpenVMS", /* 53 */
"InterBase/NetWare", /* 54 */
"InterBase/Windows", /* 55 */
"InterBase/NCR3000", /* 56 */
"InterBase/PPC/Windows NT", /* 57 */
NULL, /* "InterBase/NCR3000", /* 56 */
NULL, /* "InterBase/PPC/Windows NT", /* 57 */
"InterBase/DG_X86", /* 58 */
"InterBase/SCO_SV Intel", /* 59 *//* 5.5 SCO Port */
"InterBase/linux Intel", /* 60 */

View File

@ -8,6 +8,7 @@
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "M88K" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Cray" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "OS/2" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*/
#ifndef AUTOCONFIG_H
@ -55,7 +56,6 @@
#undef LINUX
#undef FREEBSD
#undef NETBSD
#undef apollo
#undef sun
#undef SOLARIS
#undef hpux

View File

@ -8,6 +8,7 @@
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "M88K" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Cray" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "OS/2" port
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "Apollo" port
*/
#ifndef AUTOCONFIG_H
@ -45,7 +46,6 @@
#undef LINUX
#undef FREEBSD
#undef NETBSD
#undef apollo
#undef sun
#undef SOLARIS
#undef hpux