Skip to content
Commits on Source (13)
#################################################################
# #
# Copyright (c) 2012-2017 Fidelity National Information #
# Copyright (c) 2012-2018 Fidelity National Information #
# Services, Inc. and/or its subsidiaries. All rights reserved. #
# #
# This source code contains the intellectual property #
......@@ -27,7 +27,7 @@ foreach(lang ${languages})
endforeach()
# Defaults
set(version V6.3-004)
set(version V6.3-005)
if("${version}" STREQUAL "")
set(version V9.9-0)
endif()
......
......@@ -25,16 +25,16 @@ To build GT.M for Linux, do the following steps:
2. Unpack the GT.M sources
The GT.M source tarball extracts to a directory with the version number in
the name, fis-gtm-V6.3-004
$ tar xfz fis-gtm-V6.3-004.tar.gz
$ cd fis-gtm-V6.3-004
the name, fis-gtm-V6.3-005
$ tar xfz fis-gtm-V6.3-005.tar.gz
$ cd fis-gtm-V6.3-005
You should find this README, LICENSE, COPYING and CMakeLists.txt file and
sr_* source directories.
3. Building GT.M -
<fis-gtm-build> can be a sub directory of the source directory,
fis-gtm-V6.3-004, or any other valid path.
fis-gtm-V6.3-005, or any other valid path.
$ mkdir <fis-gtm-build>
$ cd <fis-gtm-build>
......@@ -53,16 +53,16 @@ To build GT.M for Linux, do the following steps:
#
# -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package
#
$ cmake -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package <path to>/fis-gtm-V6.3-004
$ cmake -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package <path to>/fis-gtm-V6.3-005
$ make
$ make install
$ cd package/lib/fis-gtm/V6.3-004_x86_64
$ cd package/lib/fis-gtm/V6.3-005_x86_64
# Now you are ready to install GT.M. Answer a few questions and install it.
# The recommended installation path is /opt/fis-gtm/V6.3-004_x86_64
# The recommended installation path is /opt/fis-gtm/V6.3-005_x86_64
$ sudo ./configure
......
fis-gtm (6.3-004-1) UNRELEASED; urgency=medium
fis-gtm (6.3-005-1) UNRELEASED; urgency=medium
TODO: Sort out name of binary package: Shouldn't we drop the
version number in the package name?
[ Amul Shah ]
* Update to fis-gtm V6.3-004
-- Amul Shah <Amul.Shah@fisglobal.com> Wed, 04 Apr 2018 08:07:47 -0400
[ Andreas Tille ]
* New upstream version
* debhelper 11
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.2.1
* Secure URI in copyright format
* Drop useless get-orig-source target
* Remove trailing whitespace in debian/changelog
* Remove trailing whitespace in debian/copyright
-- Andreas Tille <tille@debian.org> Sun, 28 Oct 2018 11:35:30 +0100
fis-gtm (6.3-003A-2) unstable; urgency=medium
......
......@@ -6,7 +6,7 @@ Uploaders: Andreas Tille <tille@debian.org>,
Amul Shah <Amul.Shah@fisglobal.com>
Section: database
Priority: optional
Build-Depends: debhelper (>= 10),
Build-Depends: debhelper (>= 11~),
libicu-dev,
locales,
tcsh,
......@@ -23,9 +23,9 @@ Build-Depends: debhelper (>= 10),
gcc-multilib,
cmake
Build-Conflicts: locales-all
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/fis-gtm.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/fis-gtm.git
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/med-team/fis-gtm
Vcs-Git: https://salsa.debian.org/med-team/fis-gtm.git
Homepage: http://sourceforge.net/projects/fis-gtm
Package: fis-gtm
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: fis-gtm
Upstream-Contact: http://sourceforge.net/mailarchive/forum.php?forum_name=fis-gtm-core
Source: http://sourceforge.net/projects/fis-gtm/files/GT.M-x86-Linux-src/
......
......@@ -106,7 +106,4 @@ override_dh_auto_clean:
rm -rf debian/$(BINPKG)-stage1
rm -f debian/fis-gtm.links debian/fis-gtm-$(DEB_VERSION_UPSTREAM).lintian-overrides
get-orig-source:
mkdir -p ../tarballs
uscan --verbose --force-download --destdir=../tarballs
This diff is collapsed.
This diff is collapsed.
/****************************************************************
* *
* Copyright 2001, 2014 Fidelity Information Services, Inc *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
#ifndef CLI_H
#define CLI_H
/*
* -----------------------------------------------------------
* Parser include file
* -----------------------------------------------------------
*/
#define MAX_PARMS 1024 /* Maximum parameters on command line */
#define MAX_CMD_LEN 25 /* Max Command name string length */
#define MAX_OPT_LEN 25 /* Max Option name string length */
#define MAX_CLI_ERR_STR 256 /* Max error string length */
#define MAX_LINE 32767+256 /* Max line len , maximum record size plus some overhead */
#define PARM_OVHD 32 /* Parameter overhead value */
#define VAL_N_A 0 /* value type not applicable */
#define VAL_STR 1 /* String value type */
#define VAL_NUM 2 /* Number */
#define VAL_TIME 3 /* Time (can never be used on verb) */
#define VAL_LIST 3 /* Value can be a list
(only used on verb, applies to last parameter) */
#define VAL_DCM 0 /* Number is Decimal */
#define VAL_HEX 1 /* Number is Hex */
#define VAL_DISALLOWED 0 /* Value Disallowed */
#define VAL_NOT_REQ 1 /* Value not Required, but allowed */
#define VAL_REQ 2 /* Value Required */
#define PARM_NOT_REQ 0 /* Parameter optional */
#define PARM_REQ 1 /* Parameter required */
#define NON_NEG 0 /* Non Negatable */
#define NEG 1 /* Negatable */
#define CLI_ABSENT 0
#define CLI_PRESENT 1
#define CLI_NEGATED 2
#define CLI_DEFAULT 3 /* default present: The present field is only one
* bit, therefore, 3 is euqiv. to 1, i.e. CLI_PRESENT
* (since there is not CLI_DEFAULT on VMS,
* cli_present() should not return CLI_DEFAULT).
*/
#define DEFA_PRESENT (char *) 1L /* Should be same as CLI_PRESENT - default present */
#define CLI_GET_STR_ALL cli_get_str
/*
* ------------------------------------------------------
* Here the CLI_PARM structure is used
* to give default values to a qualifier
* wherever qualifiers dont require values.
* Where qualifiers require values, the
* CLI_PARM structure is used to prompt for the values.
* ------------------------------------------------------
*/
typedef struct cmd_parm_struct {
char name[MAX_OPT_LEN];
char prompt[MAX_OPT_LEN];
boolean_t parm_required; /* Is this parameter required or optional? */
} CLI_PARM;
typedef struct cmd_parm_tag {
char name[MAX_OPT_LEN]; /* name string */
void (*func)(void); /* Ptr to worker function */
struct cmd_parm_tag
*parms; /* Qualifiers */
struct cmd_parm_struct
*parm_values; /* Parameters */
struct cmd_parm_tag
*qual_vals; /* Extra Qualifiers */
boolean_t (*disallow_func)(void); /* Ptr to disallow function */
char *dfault_str;
unsigned required : 2; /* Value required flag. Values :
0 - disallowed,
1 - optional
2 - required */
unsigned short max_parms; /* Max. # of parameters allowed */
unsigned negatable : 1; /* Negatable flag */
unsigned val_type : 2; /* Value Type
VAL_N_A - type not applicable
VAL_STR - String value type
VAL_NUM - Number
VAL_TIME - Time */
unsigned hex_num : 1; /* Number is hex */
unsigned present : 2; /* Arg. is present on command line */
unsigned negated : 1; /* Arg. negated on command line */
char *pval_str; /* Value string */
} CLI_ENTRY;
typedef struct
{
int argc;
#ifdef __osf__
#pragma pointer_size (save)
#pragma pointer_size (long)
#endif
char **argv;
#ifdef __osf__
#pragma pointer_size (restore)
#endif
char *tp; /* token pointer */
int buflen; /* length of in_str */
char in_str[1]; /* input string buffer. The real length is computed and added to this block */
} IN_PARMS;
/* include platform independent prototypes */
#include "cliif.h"
#include "gtm_stdio.h"
void cli_strlwr(char *sp);
int cli_is_id(char *p);
void skip_white_space(void);
int cli_has_space(char *p);
char *cli_fgets(char *buffer, int buffersize, FILE *fp, boolean_t cli_lex_str);
#endif
/****************************************************************
* *
* Copyright (c) 2001-2018 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
* of its copyright holder(s), and is made available *
* under a license. If you do not know the terms of *
* the license, please stop and do not read further. *
* *
****************************************************************/
/*
* -----------------------------------------------------
* Lexical analyzer routines for command line interpreter
* -----------------------------------------------------
*/
#include "mdef.h"
#include "gtm_ctype.h"
#include <errno.h>
#include "gtm_stdio.h"
#include "gtm_string.h"
#ifdef UNICODE_SUPPORTED
#include "gtm_icu_api.h"
#include "gtm_utf8.h"
#endif
#include "cli.h"
#include "eintr_wrappers.h"
#include "min_max.h"
GBLDEF char cli_token_buf[MAX_LINE + 1]; /* Token buffer */
GBLREF int cmd_cnt;
GBLREF char **cmd_arg;
GBLDEF boolean_t gtm_cli_interpret_string = TRUE;
GBLDEF IN_PARMS *cli_lex_in_ptr;
#ifdef UNICODE_SUPPORTED
GBLREF boolean_t gtm_utf8_mode;
#define CLI_GET_CHAR(PTR, BUFEND, CHAR) (gtm_utf8_mode ? UTF8_MBTOWC(PTR, BUFEND, CHAR) : (CHAR = (wint_t)*(PTR), (PTR) + 1))
#define CLI_PUT_CHAR(PTR, CHAR) (gtm_utf8_mode ? UTF8_WCTOMB(CHAR, PTR) : (*(PTR) = CHAR, (PTR) + 1))
#define CLI_ISSPACE(CHAR) (gtm_utf8_mode ? U_ISSPACE(CHAR) : ISSPACE_ASCII((int)CHAR))
#else
#define CLI_GET_CHAR(PTR, BUFEND, CHAR) (CHAR = (int)*(PTR), (PTR) + 1)
#define CLI_PUT_CHAR(PTR, CHAR) (*(PTR) = CHAR, (PTR) + 1)
#define CLI_ISSPACE(CHAR) ISSPACE_ASCII(CHAR)
#endif
static int tok_string_extract(void)
{
int token_len;
boolean_t have_quote, first_quote;
uchar_ptr_t in_sp, out_sp, in_next, last_in_next,
bufend; /* really one past last byte of buffer */
# ifdef UNICODE_SUPPORTED
wint_t ch;
# else
int ch;
# endif
assert(cli_lex_in_ptr);
in_sp = (uchar_ptr_t)cli_lex_in_ptr->tp;
bufend = (uchar_ptr_t)&cli_lex_in_ptr->in_str[0] + cli_lex_in_ptr->buflen;
out_sp = (uchar_ptr_t)cli_token_buf;
token_len = 0;
have_quote = FALSE;
in_next = CLI_GET_CHAR(in_sp, bufend, ch);
for ( ; ;)
{
/* '-' is not a token separator */
while (ch && !CLI_ISSPACE(ch))
{
last_in_next = in_next;
if (ch == '"')
{
if (!have_quote)
{
if (!gtm_cli_interpret_string)
{
out_sp = CLI_PUT_CHAR(out_sp, ch);
token_len++;
}
have_quote = TRUE;
in_next = CLI_GET_CHAR(in_next, bufend, ch);
} else
{
if (!gtm_cli_interpret_string)
{
out_sp = CLI_PUT_CHAR(out_sp, ch);
token_len++;
}
in_next = CLI_GET_CHAR(in_next, bufend, ch);
if (ch == '"')
{ /* double quote, one goes in string, still have quote */
out_sp = CLI_PUT_CHAR(out_sp, ch);
in_next = CLI_GET_CHAR(in_next, bufend, ch);
token_len++;
} else
have_quote = FALSE;
}
} else
{
out_sp = CLI_PUT_CHAR(out_sp, ch);
in_next = CLI_GET_CHAR(in_next, bufend, ch);
token_len++;
}
}
if (ch == '\0')
{
in_sp = last_in_next; /* Points to start of null char so scan ends next call */
break;
}
if (have_quote)
{
out_sp = CLI_PUT_CHAR(out_sp, ch);
in_next = CLI_GET_CHAR(in_next, bufend, ch);
token_len++;
continue;
}
in_sp = in_next;
break;
}
ch = 0;
out_sp = CLI_PUT_CHAR(out_sp, ch);
cli_lex_in_ptr->tp = (char *)in_sp;
return (token_len);
}
/*
* -------------------------
* Inintialize lexer
* -------------------------
*/
#ifdef __osf__
/* N.B. If the process is started by mumps, argv passed in from main (in gtm.c) is almost straight from the operating system.
* if the process is started externally (call-ins), argc and argv are 0 and NULL respectively */
#pragma pointer_size (save)
#pragma pointer_size (long)
#endif
void cli_lex_setup (int argc, char **argv)
{
int parmlen, parmindx;
char **parmptr;
# ifdef __osf__
# pragma pointer_size (restore)
# endif
# ifdef KEEP_zOS_EBCDIC
__argvtoascii_a(argc, argv);
# endif
cmd_cnt = argc;
cmd_arg = (char **)argv;
/* Quickly run through the parameters to get a ballpark on the
size of the string needed to store them.
*/
for (parmindx = 1, parmptr = argv, parmlen = 0; parmindx <= argc; parmptr++, parmindx++)
parmlen += STRLEN(*parmptr) + 1;
parmlen = parmlen + PARM_OVHD; /* Extraneous extras, etc. */
parmlen = (parmlen > MAX_LINE ? MAX_LINE : parmlen) + 1;
/* call-ins may repeatedly initialize cli_lex_setup for every invocation of gtm_init() */
if (!cli_lex_in_ptr || parmlen > cli_lex_in_ptr->buflen)
{ /* We have the cure for a missing or unusable buffer */
if (cli_lex_in_ptr)
free(cli_lex_in_ptr);
cli_lex_in_ptr = (IN_PARMS *)malloc(SIZEOF(IN_PARMS) + parmlen);
cli_lex_in_ptr->buflen = parmlen;
}
cli_lex_in_ptr->argc = argc;
cli_lex_in_ptr->argv = argv;
cli_lex_in_ptr->in_str[0] = '\0';
cli_lex_in_ptr->tp = NULL;
}
void cli_str_setup(int addrlen, char *addr)
{
int alloclen;
assert(cli_lex_in_ptr);
alloclen = (addrlen > MAX_LINE ? MAX_LINE : addrlen) + 1;
if (!cli_lex_in_ptr || alloclen > cli_lex_in_ptr->buflen)
{ /* We have the cure for a missing or unusable buffer */
if (cli_lex_in_ptr)
free(cli_lex_in_ptr);
cli_lex_in_ptr = (IN_PARMS *)malloc(SIZEOF(IN_PARMS) + alloclen);
cli_lex_in_ptr->buflen = alloclen;
}
cli_lex_in_ptr->argv = NULL;
cli_lex_in_ptr->argc = 0;
cli_lex_in_ptr->tp = cli_lex_in_ptr->in_str;
addrlen = MIN(addrlen, alloclen - 1);
memcpy(cli_lex_in_ptr->in_str, addr, addrlen);
(cli_lex_in_ptr->in_str)[addrlen] = '\0';
}
/*
* ---------------------------------------------------------------
* Convert string to upper case. Do it only for ascii characters.
* ---------------------------------------------------------------
*/
void cli_strupper(char *sp)
{
int c;
while (c = *sp)
*sp++ = TOUPPER(c);
}
/*
* -------------------------------------------------------
* Check if string is a Hex number
*
* Return:
* TRUE - identifier
* FALSE - otherwise
* -------------------------------------------------------
*/
int cli_is_hex(char *p)
{
if (('+' == *p) || ('-' == *p))
p++;
if (('0' == *p) && ('X' == TOUPPER(*(p + 1))))
{
p = p + 2;
}
while (*p && ISXDIGIT_ASCII(*p))
p++;
return ((*p) ? FALSE : TRUE);
}
/*
* -------------------------------------------------------
* Check if token is a qualifier
*
* Return:
* TRUE - qualifier
* FALSE - otherwise
* -------------------------------------------------------
*/
int cli_is_qualif(char *p)
{
return (*p == '-');
}
/*
* -------------------------------------------------------
* Check if token is an assignment symbol
*
* Return:
* TRUE - assignment
* FALSE - otherwise
* -------------------------------------------------------
*/
int cli_is_assign(char *p)
{
return (*p == '=');
}
/* ----------------------------------------------
* Routine to skip white space while reading.
* Called when a parameter has to be read.
* The tok_string_extract () doesnt remove
* starting spaces while reading a string.
* To make use of that while reading a parameter
* this has to be called first.
* ----------------------------------------------
*/
void skip_white_space(void)
{
uchar_ptr_t in_sp;
# ifdef UNICODE_SUPPORTED
wint_t ch;
uchar_ptr_t next_sp, bufend;
# endif
assert(cli_lex_in_ptr);
in_sp = (uchar_ptr_t)cli_lex_in_ptr->tp;
# ifdef UNICODE_SUPPORTED
if (gtm_utf8_mode)
{
bufend = (uchar_ptr_t)(cli_lex_in_ptr->in_str + cli_lex_in_ptr->buflen);
for ( ; ; )
{
next_sp = UTF8_MBTOWC(in_sp, bufend, ch);
if (!U_ISSPACE(ch))
break;
in_sp = next_sp;
}
}
else
#endif
while(ISSPACE_ASCII((int)*in_sp))
in_sp++;
cli_lex_in_ptr->tp = (char *)in_sp;
}
/*
* --------------------------------------------
* Extract one token from a string.
* Token is anything between the separator characters
* or separator character itself, if it is '-' or '='.
*
* Return:
* token Length
* --------------------------------------------
*/
static int tok_extract (void)
{
int token_len;
uchar_ptr_t in_sp, in_next, out_sp, bufend;
# ifdef UNICODE_SUPPORTED
wint_t ch;
# else
int ch;
# endif
assert(cli_lex_in_ptr);
skip_white_space(); /* Skip leading blanks */
in_sp = (uchar_ptr_t)cli_lex_in_ptr->tp;
bufend = (uchar_ptr_t)&cli_lex_in_ptr->in_str[0] + cli_lex_in_ptr->buflen;
out_sp = (uchar_ptr_t)cli_token_buf;
token_len = 0;
in_next = CLI_GET_CHAR(in_sp, bufend, ch);
if ('-' == ch || '=' == ch)
{
out_sp = CLI_PUT_CHAR(out_sp, ch);
in_sp = in_next; /* advance one character */
token_len = 1;
} else if (ch) /* only if something there */
{
/* smw if quotable, need to unicode isspace (BYPASSOK) */
/* '-' is not a token separator */
while(ch && !CLI_ISSPACE(ch)
&& ch != '=')
{
out_sp = CLI_PUT_CHAR(out_sp, ch);
in_sp = in_next;
in_next = CLI_GET_CHAR(in_next, bufend, ch);
token_len++;
}
}
ch = 0;
out_sp = CLI_PUT_CHAR(out_sp, ch);
cli_lex_in_ptr->tp = (char *)in_sp;
return(token_len);
}
static void cli_lex_in_expand(int in_len)
{
IN_PARMS *new_cli_lex_in_ptr;
new_cli_lex_in_ptr = (IN_PARMS *)malloc(SIZEOF(IN_PARMS) + in_len);
new_cli_lex_in_ptr->argc = cli_lex_in_ptr->argc;
new_cli_lex_in_ptr->argv = cli_lex_in_ptr->argv;
new_cli_lex_in_ptr->buflen = in_len; /* in_str[1] accounts for null */
free(cli_lex_in_ptr);
cli_lex_in_ptr = new_cli_lex_in_ptr;
}
char *cli_fgets(char *buffer, int buffersize, FILE *fp, boolean_t cli_lex_str)
{
size_t in_len;
char cli_fgets_buffer[MAX_LINE], *destbuffer, *retptr;
# ifdef UNICODE_SUPPORTED
int mbc_len, u16_off, destsize;
int32_t mbc_dest_len;
UErrorCode errorcode;
UChar *uc_fgets_ret;
UChar32 uc32_cp;
UChar cli_fgets_Ubuffer[MAX_LINE];
static UFILE *u_fp; /* Only used in this routine so not using STATICDEF */
static FILE *save_fp; /* Only used in this routine so not using STATICDEF */
# endif
# ifdef UNICODE_SUPPORTED
if (gtm_utf8_mode)
{
cli_fgets_Ubuffer[0] = 0;
if (!cli_lex_str)
assert(MAX_LINE >= buffersize);
if (NULL == save_fp)
save_fp = fp;
/* there should be no change in fp as it is currently stdin */
assert(save_fp == fp);
/* retain the fact that u_finit has been called once without an intervening
* u_fclose so that multiple lines can be read over a pipe on hpux and solaris
*/
if (NULL == u_fp)
u_fp = u_finit(fp, NULL, UTF8_NAME);
if (NULL != u_fp)
{
do
{ /* no f_ferror */
uc_fgets_ret = u_fgets(cli_fgets_Ubuffer,
(int32_t)(SIZEOF(cli_fgets_Ubuffer) / SIZEOF(UChar)) - 1, u_fp);
} while (NULL == uc_fgets_ret && !u_feof(u_fp) && ferror(fp) && EINTR == errno);
if (NULL == uc_fgets_ret)
{
if (cli_lex_str)
cli_lex_in_ptr->tp = NULL;
u_fclose(u_fp);
/* clear u_fp in case we enter again */
u_fp = NULL;
save_fp = NULL;
return NULL;
}
in_len = u_strlen(cli_fgets_Ubuffer);
in_len = trim_U16_line_term(cli_fgets_Ubuffer, (int)in_len);
for (u16_off = 0, mbc_len = 0; u16_off < in_len; )
{
U16_NEXT(cli_fgets_Ubuffer, u16_off, in_len, uc32_cp);
mbc_len += U8_LENGTH(uc32_cp);
if (!cli_lex_str && mbc_len >= buffersize)
{ /* can't expand */
mbc_len = buffersize - 1;
cli_fgets_Ubuffer[u16_off] = 0;
U16_BACK_1(cli_fgets_Ubuffer, 0, u16_off);
in_len = u16_off + 1; /* offset to length */
break;
}
}
if (cli_lex_str)
{
if (mbc_len > cli_lex_in_ptr->buflen)
cli_lex_in_expand(mbc_len); /* for terminating null */
destsize = cli_lex_in_ptr->buflen + 1;
destbuffer = cli_lex_in_ptr->in_str;
} else
{ /* very unlikely parm is larger than MAX_LINE even i UTF-8 */
if (mbc_len >= buffersize)
destsize = buffersize - 1; /* for null */
else
destsize = buffersize;
destbuffer = buffer;
}
errorcode = U_ZERO_ERROR;
u_strToUTF8(destbuffer, destsize, &mbc_dest_len, cli_fgets_Ubuffer, (int4)in_len + 1, &errorcode);
if (U_FAILURE(errorcode))
if (U_BUFFER_OVERFLOW_ERROR == errorcode)
{ /* truncate so null terminated */
destbuffer[destsize - 1] = 0;
retptr = destbuffer;
} else
retptr = NULL;
else
retptr = destbuffer; /* Repoint to new home */
if (cli_lex_str)
cli_lex_in_ptr->tp = retptr;
} else if (cli_lex_str)
cli_lex_in_ptr->tp = retptr = NULL;
} else
{
# endif
cli_fgets_buffer[0] = '\0';
FGETS_FILE(cli_fgets_buffer, SIZEOF(cli_fgets_buffer), fp, retptr);
if (NULL != retptr)
{
in_len = strlen(cli_fgets_buffer);
if (cli_lex_str)
{
if (cli_lex_in_ptr->buflen < in_len)
cli_lex_in_expand((int)in_len);
destbuffer = cli_lex_in_ptr->in_str;
} else
{
assert(SIZEOF(cli_fgets_buffer) >= buffersize);
destbuffer = buffer;
}
retptr = destbuffer; /* return proper buffer */
if ('\n' == cli_fgets_buffer[in_len - 1])
cli_fgets_buffer[in_len - 1] = '\0'; /* replace NL */
memcpy(destbuffer, cli_fgets_buffer, in_len);
if (cli_lex_str)
cli_lex_in_ptr->tp = destbuffer;
} else if (cli_lex_str)
cli_lex_in_ptr->tp = NULL;
# ifdef UNICODE_SUPPORTED
}
# endif
return retptr;
}
/*
* -------------------------------------------------------
* Get token
*
* Return:
* Token Length
*
* Side effects:
* set eof to <> 0 for EOF condition.
* -------------------------------------------------------
*/
int cli_gettoken (int *eof)
{
int arg_no, token_len, in_len;
char *from, *to;
IN_PARMS *new_cli_lex_in_ptr;
char *tmp_tp;
assert(cli_lex_in_ptr);
/* Reading from program argument list */
if (cli_lex_in_ptr->argc > 1 && cli_lex_in_ptr->tp == 0)
{
cli_lex_in_ptr->tp = cli_lex_in_ptr->in_str;
arg_no = 1;
/* convert arguments into array */
while(arg_no < cli_lex_in_ptr->argc)
{
if (arg_no > 1)
strcat(cli_lex_in_ptr->in_str, " ");
if (strlen(cli_lex_in_ptr->in_str)
+ strlen(cli_lex_in_ptr->argv[arg_no]) > MAX_LINE)
break;
strcat(cli_lex_in_ptr->in_str, cli_lex_in_ptr->argv[arg_no++]);
}
}
if (NULL == cli_lex_in_ptr->tp || strlen(cli_lex_in_ptr->tp) < 1)
{
cli_token_buf[0] = '\0';
/* cli_fgets can malloc/free cli_lex_in_ptr. Passing in TRUE as last parameter will do the set
* to cli_lex_in_ptr->tp within cli_fgets() after any malloc/free, thus avoiding the problem of
* writing to freed memory if the set were done here.
*/
cli_fgets(cli_lex_in_ptr->in_str, MAX_LINE, stdin, TRUE);
if (NULL != cli_lex_in_ptr->tp)
*eof = 0;
else
{
*eof = EOF;
return (0);
}
}
token_len = tok_extract();
*eof = (cli_lex_in_ptr->argc > 1 && token_len == 0);
return token_len;
}
/*
* --------------------------------------------
* Copy next token to the token buffer.
* Do not advance the token pointer.
*
* Return:
* Token Length
*
* Side effects:
* set eof to <> 0 for EOF condition.
* -------------------------------------------------------
*/
int cli_look_next_token(int *eof)
{
int tok_len;
char *old_tp;
assert(cli_lex_in_ptr);
if (((char *) NULL == cli_lex_in_ptr->tp) || (!strlen(cli_lex_in_ptr->tp)))
return(0);
old_tp = cli_lex_in_ptr->tp;
tok_len = cli_gettoken(eof);
cli_lex_in_ptr->tp = old_tp;
return(tok_len);
}
int cli_look_next_string_token(int *eof)
{
int tok_len;
char *old_tp;
assert(cli_lex_in_ptr);
if (!strlen(cli_lex_in_ptr->tp))
return(0);
old_tp = cli_lex_in_ptr->tp;
tok_len = cli_get_string_token(eof);
cli_lex_in_ptr->tp = old_tp;
return(tok_len);
}
int cli_get_string_token(int *eof)
{
int arg_no, token_len, in_len;
char *from, *to;
IN_PARMS *new_cli_lex_in_ptr;
assert(cli_lex_in_ptr);
/* Reading from program argument list */
if (cli_lex_in_ptr->argc > 1 && cli_lex_in_ptr->tp == 0)
{
cli_lex_in_ptr->tp = cli_lex_in_ptr->in_str;
arg_no = 1;
/* convert arguments into array */
while(arg_no < cli_lex_in_ptr->argc)
{
if ((strlen(cli_lex_in_ptr->in_str) + strlen(cli_lex_in_ptr->argv[arg_no]) + 1) > MAX_LINE)
break;
if (arg_no > 1)
strcat(cli_lex_in_ptr->in_str, " ");
if (cli_has_space(cli_lex_in_ptr->argv[arg_no]))
{
from = cli_lex_in_ptr->argv[arg_no++];
to = cli_lex_in_ptr->in_str + strlen(cli_lex_in_ptr->in_str) - 1;
*to++ = '\"';
while(*from != '\0')
{
if ('\"' == *from)
*to++ = *from;
*to++ = *from++;
}
*to++ = '\"';
*to = '\0';
} else
strcat(cli_lex_in_ptr->in_str, cli_lex_in_ptr->argv[arg_no++]);
}
}
if (NULL == cli_lex_in_ptr->tp || strlen(cli_lex_in_ptr->tp) < 1)
{
cli_token_buf[0] = '\0';
/* cli_fgets can malloc/free cli_lex_in_ptr. Passing in TRUE as last parameter will do the set
* to cli_lex_in_ptr->tp within cli_fgets() after any malloc/free, thus avoiding the problem of
* writing to freed memory if the set were done here.
*/
cli_fgets(cli_lex_in_ptr->in_str, MAX_LINE, stdin, TRUE);
if (NULL != cli_lex_in_ptr->tp)
*eof = 0;
else
{
*eof = EOF;
return (0);
}
}
token_len = tok_string_extract();
*eof = (cli_lex_in_ptr->argc > 1 && token_len == 0);
return token_len;
}
/*
* -------------------------------------------------------
* Check if string has space in it
*
* Return:
* TRUE - identifier
* FALSE - otherwise
* -------------------------------------------------------
*/
int cli_has_space(char *p)
{
# ifdef UNICODE_SUPPORTED
uchar_ptr_t local_p, next_p, bufend;
wint_t ch;
if (gtm_utf8_mode)
{
local_p = (uchar_ptr_t)p;
bufend = local_p + strlen(p);
while (local_p)
{
next_p = UTF8_MBTOWC(local_p, bufend, ch);
if (!ch || U_ISSPACE(ch))
break;
local_p = next_p;
}
p = (char *)local_p;
}
else
# endif
while (*p && !ISSPACE_ASCII(*p))
p++;
return ((*p) ? (TRUE) : (FALSE));
}
......@@ -28,8 +28,17 @@ LITDEF int CMERR_INVINTMSG = 150568994;
LITDEF int CMERR_CMEXCDASTLM = 150569002;
LITDEF int CMERR_CMSYSSRV = 150569010;
LITDEF int cmerrors_undocarr[] = {
};
GBLDEF err_ctl cmerrors_ctl = {
249,
"GTCM",
&cmerrors[0],
6};
6,
&cmerrors_undocarr[0],
0
};
......@@ -66,8 +66,17 @@ LITDEF int CMI_REASON_OVERRUN = 150634682;
LITDEF int CMI_REASON_STATUS = 150634690;
LITDEF int CMI_REASON_CONFIRM = 150634698;
LITDEF int cmierrors_undocarr[] = {
};
GBLDEF err_ctl cmierrors_ctl = {
250,
"CMI",
&cmierrors[0],
25};
25,
&cmierrors_undocarr[0],
0
};
/****************************************************************
* *
* Copyright (c) 2001-2016 Fidelity National Information *
* Copyright (c) 2001-2018 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......@@ -833,7 +833,6 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
assert(val_output);
offset = sa_temps_offset[opr->oprclass];
offset -= (sa_temps[opr->oprclass] - opr->oprval.temp) * sa_class_sizes[opr->oprclass];
assertpro((0 <= offset) && (65535 >= offset));
emit_op_base_offset(op, I386_REG_EDI, offset, use_reg);
break;
case TCAD_REF:
......@@ -841,7 +840,6 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
case TVAR_REF:
offset = sa_temps_offset[opr->oprclass];
offset -= (sa_temps[opr->oprclass] - opr->oprval.temp) * sa_class_sizes[opr->oprclass];
assertpro((0 <= offset) && (65535 >= offset));
if (opr->oprclass == TVAR_REF)
base_reg = I386_REG_ESI;
else
......@@ -1030,7 +1028,6 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
assert(val_output);
offset = sa_temps_offset[opr->oprclass];
offset -= (sa_temps[opr->oprclass] - opr->oprval.temp) * sa_class_sizes[opr->oprclass];
assertpro((0 <= offset) && (65535 >= offset));
emit_op_base_offset(op, I386_REG_EDI, offset, use_reg);
break;
case TCAD_REF:
......@@ -1038,7 +1035,6 @@ void emit_trip(generic_op op, oprtype *opr, bool val_output, unsigned char use_r
case TVAR_REF:
offset = sa_temps_offset[opr->oprclass];
offset -= (sa_temps[opr->oprclass] - opr->oprval.temp) * sa_class_sizes[opr->oprclass];
assertpro((0 <= offset) && (65535 >= offset));
if (opr->oprclass == TVAR_REF)
base_reg = I386_REG_ESI;
else
......
......@@ -188,8 +188,17 @@ LITDEF int GDE_GBLNAMCOLLVER = 150504098;
LITDEF int GDE_GDEASYNCIONOMM = 150504106;
LITDEF int GDE_NOPERCENTY = 150504114;
LITDEF int gdeerrors_undocarr[] = {
};
GBLDEF err_ctl gdeerrors_ctl = {
248,
"GDE",
&gdeerrors[0],
86};
86,
&gdeerrors_undocarr[0],
0
};
......@@ -134,16 +134,16 @@ const static readonly int error_ansi[] = {
0, /* JNLINVALID */
0, /* MBXWRTONLY */
0, /* MEMORY */
70, /* MTBLKTOOBIG */
70, /* MTBLKTOOSM */
70, /* MTFIXRECSZ */
0, /* MTIS */
0, /* MTRDBADBLK */
62, /* MTRDONLY */
0, /* MTRDTHENWRT */
71, /* MTRECGTRBLK */
72, /* MTRECTOOBIG */
72, /* MTRECTOOSM */
0, /* UNUSEDMSG305 */
0, /* UNUSEDMSG306 */
0, /* UNUSEDMSG307 */
0, /* UNUSEDMSG308 */
0, /* UNUSEDMSG309 */
0, /* UNUSEDMSG310 */
0, /* UNUSEDMSG311 */
0, /* UNUSEDMSG312 */
0, /* UNUSEDMSG313 */
0, /* UNUSEDMSG314 */
0, /* JNLTMQUAL3 */
57, /* MULTLAB */
0, /* BLKCNT */
......@@ -348,9 +348,9 @@ const static readonly int error_ansi[] = {
0, /* AMBISYIPARAM */
0, /* PREVJNLNOEOF */
0, /* LKSECINIT */
0, /* MTDOSLAB */
0, /* MTDOSFOR */
0, /* MTINVLAB */
0, /* UNUSEDMSG519 */
0, /* UNUSEDMSG520 */
0, /* UNUSEDMSG521 */
0, /* TXTSRCMAT */
0, /* CCENOGROUP */
0, /* BADDBVER */
......@@ -373,8 +373,8 @@ const static readonly int error_ansi[] = {
0, /* NETFAIL */
0, /* NETLCKFAIL */
0, /* TTINVFILTER */
0, /* MTANSILAB */
0, /* MTANSIFOR */
0, /* UNUSEDMSG544 */
0, /* UNUSEDMSG545 */
0, /* BADTRNPARAM */
0, /* DSEONLYBGMM */
0, /* DSEINVLCLUSFN */
......@@ -460,7 +460,7 @@ const static readonly int error_ansi[] = {
0, /* COLLTYPVERSION */
0, /* LVNULLSUBS */
0, /* GVREPLERR */
0, /* MTIOERR */
0, /* UNUSEDMSG631 */
72, /* RMWIDTHPOS */
13, /* OFFSETINV */
0, /* JOBPARTOOLONG */
......@@ -502,7 +502,7 @@ const static readonly int error_ansi[] = {
0, /* CETOOLONG */
0, /* CENOINDIR */
0, /* COLLATIONUNDEF */
0, /* UNUSEDMSG673 */
0, /* MSTACKCRIT */
0, /* GTMSECSHRSRVF */
0, /* FREEZECTRL */
0, /* JNLFLUSH */
......@@ -517,7 +517,7 @@ const static readonly int error_ansi[] = {
80, /* SOCKINIT */
81, /* OPENCONN */
0, /* DEVNOTIMP */
0, /* UNUSEDMSG688 */
0, /* PATALTER2LARGE */
0, /* DBREMOTE */
0, /* JNLREQUIRED */
0, /* TPMIXUP */
......@@ -654,7 +654,7 @@ const static readonly int error_ansi[] = {
0, /* MUNOFINISH */
0, /* DBFILEXT */
0, /* JNLFSYNCERR */
0, /* UNUSEDMSG825 */
0, /* ICUNOTENABLED */
0, /* ZCPREALLVALINV */
0, /* NEWJNLFILECREAT */
0, /* DSKSPACEFLOW */
......@@ -1506,4 +1506,9 @@ const static readonly int error_ansi[] = {
0, /* MSTACKSZNA */
0, /* JNLEXTRCTSEQNO */
0, /* INVSEQNOQUAL */
0, /* LOWSPC */
0, /* FAILEDRECCOUNT */
0, /* LOADRECCNT */
0, /* COMMFILTERERR */
0, /* NOFILTERNEST */
};
......@@ -75,7 +75,7 @@ LITDEF err_msg merrors[] = {
{ "TRANSNOSTART", "ZTCOMMIT(s) issued without corresponding ZTSTART(s)", 0 },
{ "FNUMARG", "$FNUMBER format specifier \"!AD\" contains an illegal character: \"!AD\"", 4 },
{ "FOROFLOW", "FOR commands nested more than !UL deep on a line", 1 },
{ "YDIRTSZ", "Size of YDIRT data too large", 0 },
{ "YDIRTSZ", "Improper size of YDIRT data: !UL", 1 },
{ "JNLSUCCESS", "!AD successful", 2 },
{ "GBLNAME", "Either an identifier or a left parenthesis is expected after a ^ in this context", 0 },
{ "GBLOFLOW", "Database segment is full", 0 },
......@@ -136,16 +136,16 @@ LITDEF err_msg merrors[] = {
{ "JNLINVALID", "!AD is not a valid journal file !/ for database file: !AD", 4 },
{ "MBXWRTONLY", "Mailbox is write only, cannot read from it", 0 },
{ "MEMORY", "Central memory exhausted during request for !UJ bytes from 0x!XJ", 2 },
{ "MTBLKTOOBIG", "Magtape BLOCK_SIZE exceeds maximum size allowed", 0 },
{ "MTBLKTOOSM", "Magtape BLOCK_SIZE is less than !UL bytes", 1 },
{ "MTFIXRECSZ", "BLOCK_SIZE !UL must be multiple of fixed record size !UL", 2 },
{ "MTIS", "Magnetic tape: !AD", 2 },
{ "MTRDBADBLK", "Block read too small, contained only !UL bytes, block size = !UL", 2 },
{ "MTRDONLY", "Cannot write to a READONLY magtape", 0 },
{ "MTRDTHENWRT", "Attempt to read after a write to a magtape", 0 },
{ "MTRECGTRBLK", "Magtape record size cannot exceed block size", 0 },
{ "MTRECTOOBIG", "Magtape record size exceeds maximum allowed", 0 },
{ "MTRECTOOSM", "Magtape record size is too small for record type", 0 },
{ "UNUSEDMSG305", "MTBLKTOOBIG last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG306", "MTBLKTOOSM last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG307", "MTFIXRECSZ last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG308", "MTIS last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG309", "MTRDBADBLK last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG310", "MTRDONLY last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG311", "MTRDTHENWRT last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG312", "MTRECGTRBLK last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG313", "MTRECTOOBIG last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG314", "MTRECTOOSM last used in V6.3-003 Dec. 2017", 0 },
{ "JNLTMQUAL3", "Time qualifier BEFORE_TIME=\"!AZ\" is less than the journal file(s) minimum timestamp=\"!AZ\"", 2 },
{ "MULTLAB", "This label has been previously defined", 0 },
{ "BLKCNT", "Last LOAD Block/RMS Record number: !UL", 1 },
......@@ -171,7 +171,7 @@ LITDEF err_msg merrors[] = {
{ "REC2BIG", "Record size (!UL) is greater than maximum (!UL) for region: !AD", 4 },
{ "RHMISSING", "Right-hand side of expression expected", 0 },
{ "DEVICEREADONLY", "Cannot write to read-only device", 0 },
{ "COLLDATAEXISTS", "Collation type cannot be changed while data exists", 0 },
{ "COLLDATAEXISTS", "Collation type cannot be changed while !AD!AD data exists", 4 },
{ "ROUTINEUNKNOWN", "Routine could not be found", 0 },
{ "RPARENMISSING", "Right parenthesis expected", 0 },
{ "RTNNAME", "Routine name expected here", 0 },
......@@ -190,11 +190,11 @@ LITDEF err_msg merrors[] = {
{ "STACKUNDERFLO", "Stack underflow", 0 },
{ "STRINGOFLOW", "String pool overflow", 0 },
{ "SVNOSET", "Cannot SET this special variable", 0 },
{ "VIEWFN", "View parameter is not valid with $VIEW()", 0 },
{ "VIEWFN", "View parameter !AD is not valid with the $VIEW() function", 2 },
{ "TERMASTQUOTA", "Process AST quota exceeded, cannot open terminal", 0 },
{ "TEXTARG", "Invalid argument to $TEXT function", 0 },
{ "TMPSTOREMAX", "Maximum space for temporary values exceeded", 0 },
{ "VIEWCMD", "View parameter is not valid with VIEW command", 0 },
{ "VIEWCMD", "View parameter !AD is not valid with the VIEW command", 2 },
{ "JNI", "!AD", 2 },
{ "TXTSRCFMT", "$TEXT encountered an invalid source program file format", 0 },
{ "UIDMSG", "Unidentified message received", 0 },
......@@ -350,9 +350,9 @@ LITDEF err_msg merrors[] = {
{ "AMBISYIPARAM", "Parameter !AD is ambiguous to $ZGETSYI()", 2 },
{ "PREVJNLNOEOF", "A previous generation journal file !AD does not have valid EOF", 2 },
{ "LKSECINIT", "Error creating LOCK section for database !AD", 2 },
{ "MTDOSLAB", "Tape label is not in valid DOS-11 format", 0 },
{ "MTDOSFOR", "Use of DOS-11 labels requires stream format", 0 },
{ "MTINVLAB", "Invalid label type specified in magtape OPEN", 0 },
{ "UNUSEDMSG519", "MTDOSLAB last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG520", "MTDOSFOR last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG521", "MTINVLAB last used in V6.3-003 Dec. 2017", 0 },
{ "TXTSRCMAT", "M object module and source file do not match", 0 },
{ "CCENOGROUP", "CCE does not have GROUP privilege. Information may be incomplete.", 0 },
{ "BADDBVER", "Incorrect database version: !AD", 2 },
......@@ -375,8 +375,8 @@ LITDEF err_msg merrors[] = {
{ "NETFAIL", "Failure of Net operation", 0 },
{ "NETLCKFAIL", "Lock operation across Net failed", 0 },
{ "TTINVFILTER", "Invalid FILTER argument", 0 },
{ "MTANSILAB", "Tape label is not in valid ANSI format", 0 },
{ "MTANSIFOR", "Use of ANSI labels does not allow stream format", 0 },
{ "UNUSEDMSG544", "MTANSILAB last used in V6.3-003 Dec. 2017", 0 },
{ "UNUSEDMSG545", "MTANSIFOR last used in V6.3-003 Dec. 2017", 0 },
{ "BADTRNPARAM", "!AD is not a legal parameter to $ZTRNLNM", 2 },
{ "DSEONLYBGMM", "!AD is supported only for BG/MM access methods", 2 },
{ "DSEINVLCLUSFN", "Specified function is invalid for clustered databases", 0 },
......@@ -462,7 +462,7 @@ LITDEF err_msg merrors[] = {
{ "COLLTYPVERSION", "Collation type !UL, version !UL mismatch", 2 },
{ "LVNULLSUBS", "Null subscripts not allowed in local variables", 0 },
{ "GVREPLERR", "Error replicating global in region !AD", 2 },
{ "MTIOERR", "I/O Error with magnetic tape device !AD", 2 },
{ "UNUSEDMSG631", "MTIOERR last used in V6.3-003 Dec. 2017", 0 },
{ "RMWIDTHPOS", "File record size or width must be greater than zero", 0 },
{ "OFFSETINV", "Entry point !AD+!SL not valid", 3 },
{ "JOBPARTOOLONG", "Total parameter length is too long for job command", 0 },
......@@ -504,7 +504,7 @@ LITDEF err_msg merrors[] = {
{ "CETOOLONG", "Compiler escape substitution exceeds maximum line size", 0 },
{ "CENOINDIR", "Indirection type information not available for compiler escape feature", 0 },
{ "COLLATIONUNDEF", "Collation type !UL is not defined", 1 },
{ "UNUSEDMSG673", "RBWRNNOTCHG last used in V6.2-002A", 0 },
{ "MSTACKCRIT", "User-specified M stack size critical threshold of !UL not appropriate; must be between !UL and !UL; reverting to !UL", 4 },
{ "GTMSECSHRSRVF", "!AD - !UL : Attempt to service request failed (retry = !UL)", 4 },
{ "FREEZECTRL", "Control Y or control C encountered during attempt to freeze the database. Aborting freeze.", 0 },
{ "JNLFLUSH", "Error flushing journal buffers to journal file !AD", 2 },
......@@ -519,7 +519,7 @@ LITDEF err_msg merrors[] = {
{ "SOCKINIT", "Error initializing socket: (errno == !UL) !AD", 3 },
{ "OPENCONN", "Error opening socket connection", 0 },
{ "DEVNOTIMP", "!AD device not implemented on in this environment", 2 },
{ "UNUSEDMSG688", "JNLEXTR last sometime prior to V4.4-002", 0 },
{ "PATALTER2LARGE", "Pattern match alternation exceeded the !UL repetition limit on prospective matches", 1 },
{ "DBREMOTE", "Database region !AD is remote; perform maintenance on the server node", 2 },
{ "JNLREQUIRED", "Journaling is required for clustered operation with file !AD", 2 },
{ "TPMIXUP", "!AZ transaction cannot be started within !AZ transaction", 2 },
......@@ -644,7 +644,7 @@ LITDEF err_msg merrors[] = {
{ "JNLRDONLY", "Journal file !AD read only", 2 },
{ "ANCOMPTINC", "Deviceparameter !AD is not compatible with any other deviceparameters in the !AD command", 4 },
{ "ABNCOMPTINC", "Deviceparameter !AD and deviceparameter !AD are not compatible in the !AD command", 6 },
{ "RECLOAD", "Error loading record number: !@UQ!/", 1 },
{ "RECLOAD", "Error loading record number: !AD", 2 },
{ "SOCKNOTFND", "Socket !AD not found", 2 },
{ "CURRSOCKOFR", "Current socket of index !UL is out of range. There are only !UL sockets.", 2 },
{ "SOCKETEXIST", "Socket !AD already exists", 2 },
......@@ -656,7 +656,7 @@ LITDEF err_msg merrors[] = {
{ "MUNOFINISH", "MUPIP unable to finish all requested actions", 0 },
{ "DBFILEXT", "Database file !AD extended from 0x!XL blocks to 0x!XL at transaction 0x!16@XQ", 5 },
{ "JNLFSYNCERR", "Error synchronizing journal file !AD to disk", 2 },
{ "UNUSEDMSG825", "FSYNCTIMOUT last used in V6.0-001", 0 },
{ "ICUNOTENABLED", "ICU libraries not loaded", 0 },
{ "ZCPREALLVALINV", "The pre-allocation value exceeded the maximum string length", 0 },
{ "NEWJNLFILECREAT", "Journal file !AD nearing maximum size. New journal file created.", 2 },
{ "DSKSPACEFLOW", "Disk Space for file !AD nearing maximum size. !UL blocks available.", 3 },
......@@ -1508,6 +1508,11 @@ LITDEF err_msg merrors[] = {
{ "MSTACKSZNA", "User-specified M stack size of !UL KiB not appropriate; must be between !UL KiB and !UL KiB; reverting to !UL KiB", 4 },
{ "JNLEXTRCTSEQNO", "Journal Extracts based on sequence numbers are restricted to a single region when replication is OFF", 0 },
{ "INVSEQNOQUAL", "Invalid SEQNO qualifier value !AD", 2 },
{ "LOWSPC", "WARNING: Database !AD has less than !UL% of the total block space remaining. Blocks Used: !UL Total Blocks Available: !UL", 5 },
{ "FAILEDRECCOUNT", "LOAD unable to process !@UQ records", 1 },
{ "LOADRECCNT", "Last EXTRACT record processed by LOAD: !@UQ", 1 },
{ "COMMFILTERERR", "Error executing the command filter for !AD. !AD", 4 },
{ "NOFILTERNEST", "Filter nesting not allowed", 0 },
};
LITDEF int ERR_ACK = 150372361;
......@@ -1633,16 +1638,16 @@ LITDEF int ERR_MBXRDONLY = 150373314;
LITDEF int ERR_JNLINVALID = 150373322;
LITDEF int ERR_MBXWRTONLY = 150373330;
LITDEF int ERR_MEMORY = 150373340;
LITDEF int ERR_MTBLKTOOBIG = 150373346;
LITDEF int ERR_MTBLKTOOSM = 150373354;
LITDEF int ERR_MTFIXRECSZ = 150373362;
LITDEF int ERR_MTIS = 150373371;
LITDEF int ERR_MTRDBADBLK = 150373378;
LITDEF int ERR_MTRDONLY = 150373386;
LITDEF int ERR_MTRDTHENWRT = 150373394;
LITDEF int ERR_MTRECGTRBLK = 150373402;
LITDEF int ERR_MTRECTOOBIG = 150373410;
LITDEF int ERR_MTRECTOOSM = 150373418;
LITDEF int ERR_UNUSEDMSG305 = 150373346;
LITDEF int ERR_UNUSEDMSG306 = 150373354;
LITDEF int ERR_UNUSEDMSG307 = 150373362;
LITDEF int ERR_UNUSEDMSG308 = 150373370;
LITDEF int ERR_UNUSEDMSG309 = 150373378;
LITDEF int ERR_UNUSEDMSG310 = 150373386;
LITDEF int ERR_UNUSEDMSG311 = 150373394;
LITDEF int ERR_UNUSEDMSG312 = 150373402;
LITDEF int ERR_UNUSEDMSG313 = 150373410;
LITDEF int ERR_UNUSEDMSG314 = 150373418;
LITDEF int ERR_JNLTMQUAL3 = 150373426;
LITDEF int ERR_MULTLAB = 150373434;
LITDEF int ERR_BLKCNT = 150373443;
......@@ -1847,9 +1852,9 @@ LITDEF int ERR_FNOTONSYS = 150375026;
LITDEF int ERR_AMBISYIPARAM = 150375034;
LITDEF int ERR_PREVJNLNOEOF = 150375042;
LITDEF int ERR_LKSECINIT = 150375050;
LITDEF int ERR_MTDOSLAB = 150375058;
LITDEF int ERR_MTDOSFOR = 150375066;
LITDEF int ERR_MTINVLAB = 150375074;
LITDEF int ERR_UNUSEDMSG519 = 150375058;
LITDEF int ERR_UNUSEDMSG520 = 150375066;
LITDEF int ERR_UNUSEDMSG521 = 150375074;
LITDEF int ERR_TXTSRCMAT = 150375082;
LITDEF int ERR_CCENOGROUP = 150375088;
LITDEF int ERR_BADDBVER = 150375098;
......@@ -1872,8 +1877,8 @@ LITDEF int ERR_SERVERERR = 150375226;
LITDEF int ERR_NETFAIL = 150375234;
LITDEF int ERR_NETLCKFAIL = 150375242;
LITDEF int ERR_TTINVFILTER = 150375251;
LITDEF int ERR_MTANSILAB = 150375258;
LITDEF int ERR_MTANSIFOR = 150375266;
LITDEF int ERR_UNUSEDMSG544 = 150375258;
LITDEF int ERR_UNUSEDMSG545 = 150375266;
LITDEF int ERR_BADTRNPARAM = 150375274;
LITDEF int ERR_DSEONLYBGMM = 150375280;
LITDEF int ERR_DSEINVLCLUSFN = 150375288;
......@@ -1959,7 +1964,7 @@ LITDEF int ERR_TERMWRITE = 150375922;
LITDEF int ERR_COLLTYPVERSION = 150375930;
LITDEF int ERR_LVNULLSUBS = 150375938;
LITDEF int ERR_GVREPLERR = 150375946;
LITDEF int ERR_MTIOERR = 150375954;
LITDEF int ERR_UNUSEDMSG631 = 150375954;
LITDEF int ERR_RMWIDTHPOS = 150375962;
LITDEF int ERR_OFFSETINV = 150375970;
LITDEF int ERR_JOBPARTOOLONG = 150375978;
......@@ -2001,7 +2006,7 @@ LITDEF int ERR_CEBIGSKIP = 150376258;
LITDEF int ERR_CETOOLONG = 150376266;
LITDEF int ERR_CENOINDIR = 150376274;
LITDEF int ERR_COLLATIONUNDEF = 150376282;
LITDEF int ERR_UNUSEDMSG673 = 150376290;
LITDEF int ERR_MSTACKCRIT = 150376290;
LITDEF int ERR_GTMSECSHRSRVF = 150376298;
LITDEF int ERR_FREEZECTRL = 150376307;
LITDEF int ERR_JNLFLUSH = 150376315;
......@@ -2016,7 +2021,7 @@ LITDEF int ERR_SOCKACPT = 150376378;
LITDEF int ERR_SOCKINIT = 150376386;
LITDEF int ERR_OPENCONN = 150376394;
LITDEF int ERR_DEVNOTIMP = 150376402;
LITDEF int ERR_UNUSEDMSG688 = 150376410;
LITDEF int ERR_PATALTER2LARGE = 150376410;
LITDEF int ERR_DBREMOTE = 150376418;
LITDEF int ERR_JNLREQUIRED = 150376426;
LITDEF int ERR_TPMIXUP = 150376434;
......@@ -2153,7 +2158,7 @@ LITDEF int ERR_RDFLTOOLONG = 150377474;
LITDEF int ERR_MUNOFINISH = 150377482;
LITDEF int ERR_DBFILEXT = 150377491;
LITDEF int ERR_JNLFSYNCERR = 150377498;
LITDEF int ERR_UNUSEDMSG825 = 150377506;
LITDEF int ERR_ICUNOTENABLED = 150377504;
LITDEF int ERR_ZCPREALLVALINV = 150377514;
LITDEF int ERR_NEWJNLFILECREAT = 150377523;
LITDEF int ERR_DSKSPACEFLOW = 150377531;
......@@ -3005,9 +3010,49 @@ LITDEF int ERR_SYSUTILCONF = 150384290;
LITDEF int ERR_MSTACKSZNA = 150384299;
LITDEF int ERR_JNLEXTRCTSEQNO = 150384306;
LITDEF int ERR_INVSEQNOQUAL = 150384314;
LITDEF int ERR_LOWSPC = 150384323;
LITDEF int ERR_FAILEDRECCOUNT = 150384330;
LITDEF int ERR_LOADRECCNT = 150384339;
LITDEF int ERR_COMMFILTERERR = 150384346;
LITDEF int ERR_NOFILTERNEST = 150384354;
LITDEF int merrors_undocarr[] = {
0, /* ACK */
656, /* ASC2EBCDICCONV */
1444, /* DBGLDMISMATCH */
621, /* DEFEREVENT */
1472, /* DRVLONGJMP */
44, /* ENQ */
1332, /* FAKENOSPCLEARED */
595, /* FREEZEID */
703, /* INVDBGLVL */
508, /* JNLREQUIRED */
410, /* JNLWRTNOWWRTR */
989, /* JOBINTRRETHROW */
938, /* JOBINTRRQST */
336, /* LKSECINIT */
1480, /* LVMONBADVAL */
824, /* MUDESTROYFAIL */
822, /* MUDESTROYSUC */
895, /* REPEATERROR */
1260, /* REPLONLNRLBK */
898, /* SYSTEMVALUE */
467, /* TPRETRY */
252, /* WILLEXPIRE */
62, /* YDIRTSZ */
469, /* ZDEFACTIVE */
470, /* ZDEFOFLOW */
1189, /* ZLINKBYPASS */
};
GBLDEF err_ctl merrors_ctl = {
246,
"GTM",
&merrors[0],
1495};
1500,
&merrors_undocarr[0],
26
};
......@@ -12,17 +12,17 @@
#ifndef GTM_RELEASE_NAME
#ifdef __CYGWIN__
#define GTM_RELEASE_NAME "GT.M V6.3-004 CYGWIN x86"
#define GTM_RELEASE_NAME "GT.M V6.3-005 CYGWIN x86"
#elif defined(__ia64)
#define GTM_RELEASE_NAME "GT.M V6.3-004 Linux IA64"
#define GTM_RELEASE_NAME "GT.M V6.3-005 Linux IA64"
#elif defined(__x86_64__)
#define GTM_RELEASE_NAME "GT.M V6.3-004 Linux x86_64"
#define GTM_RELEASE_NAME "GT.M V6.3-005 Linux x86_64"
#elif defined(__s390__)
#define GTM_RELEASE_NAME "GT.M V6.3-004 Linux S390X"
#define GTM_RELEASE_NAME "GT.M V6.3-005 Linux S390X"
#else
#define GTM_RELEASE_NAME "GT.M V6.3-004 Linux x86"
#define GTM_RELEASE_NAME "GT.M V6.3-005 Linux x86"
#endif
#endif
#define GTM_PRODUCT "GT.M"
#define GTM_VERSION "V6.3"
#define GTM_RELEASE_STAMP "20180316 15:27"
#define GTM_RELEASE_STAMP "20180625 11:40"
/****************************************************************
* *
* Copyright (c) 2001-2017 Fidelity National Information *
* Copyright (c) 2001-2018 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......@@ -15,6 +15,7 @@
#include "gtm_string.h"
#include "compiler.h"
#include "cmd_qlf.h"
#include "toktyp.h"
#include "stringpool.h"
#include "gtm_caseconv.h"
......@@ -26,6 +27,7 @@
#include "gtm_icu_api.h" /* U_ISPRINT() needs this header */
#endif
GBLREF command_qualifier cmd_qlf;
GBLREF int source_column;
GBLREF spdesc stringpool;
GBLREF boolean_t gtm_utf8_mode;
......@@ -103,7 +105,6 @@ void advancewindow(void)
TREF(director_token) = TREF(window_token) = TK_ERROR;
return;
}
show_source_line(TRUE);
if (!gtm_utf8_mode)
charlen = 1; /* always one character in M mode */
# ifdef UNICODE_SUPPORTED
......@@ -119,9 +120,13 @@ void advancewindow(void)
*error++ = ',';
}
error--; /* do not include the last comma */
if (!(TREF(compile_time) && !(cmd_qlf.qlf & CQ_WARNINGS)))
{
show_source_line(TRUE);
dec_err(VARLSTCNT(4) ERR_LITNONGRAPH, 2, (error - errtxt), errtxt);
}
}
}
if ('\"' == x)
{
UNICODE_ONLY(assert(!gtm_utf8_mode || (cp1 == cptr)));
......
/****************************************************************
* *
* Copyright (c) 2012-2017 Fidelity National Information *
* Copyright (c) 2012-2018 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......@@ -22,6 +22,7 @@
#include "sleep_cnt.h" /* needed for SLEEP_INSTFREEZEWAIT macro */
#include "wait_for_disk_space.h" /* needed by DB_LSEEKWRITE macro for prototype */
#include "gtmimagename.h" /* needed for IS_GTM_IMAGE */
#include "jnl.h" /* needed for REPL_ALLOWED */
#include "forced_exit_err_display.h"
boolean_t is_anticipatory_freeze_needed(sgmnt_addrs *csa, int msg_id);
......@@ -141,13 +142,8 @@ error_def(ERR_TEXT);
* hence the check for NULL before trying to access onln_rlbk_pid.
* These macros set LCL_JNLPOOL to the assocaited jnlpool if TRUE otherwise to NULL
*/
#define INSTANCE_FREEZE_HONORED(CSA, LCL_JNLPOOL) (DBG_ASSERT((NULL != CSA)) \
(LCL_JNLPOOL = JNLPOOL_FROM((sgmnt_addrs *)CSA)) \
&& ((NULL != LCL_JNLPOOL->jnlpool_ctl) \
&& ((REPL_ALLOWED(((sgmnt_addrs *)CSA)->hdr)) \
|| mupip_jnl_recover /* recover or rollback */ \
|| (NULL != ((sgmnt_addrs *)CSA)->nl) \
&& (((sgmnt_addrs *)CSA)->nl->onln_rlbk_pid))))
#define INSTANCE_FREEZE_HONORED(CSA, LCL_JNLPOOL) instance_freeze_honored(CSA, &(LCL_JNLPOOL))
#define INST_FREEZE_ON_ERROR_ENABLED(CSA, LCL_JNLPOOL) (INSTANCE_FREEZE_HONORED(CSA, LCL_JNLPOOL) \
&& CUSTOM_ERRORS_LOADED_CSA(CSA, LCL_JNLPOOL) \
&& (((sgmnt_addrs *)CSA)->hdr->freeze_on_fail))
......@@ -186,6 +182,12 @@ error_def(ERR_TEXT);
SNPRINTF(BUF, BUF_LEN, INST_FROZEN_COMMENT, process_id, msginfo->tag); \
}
#ifdef DEBUG
void clear_fake_enospc_if_master_dead(void);
#define CLEAR_FAKE_ENOSPC_IF_MASTER_DEAD clear_fake_enospc_if_master_dead()
#endif
/* This is a version of the macro which waits for the instance freeze to be lifted off assuming the process has
* already attached to the journal pool. We need to wait for the freeze only if the input database cares about
* anticipatory freeze. Examples of those databases that don't care are non-replicated databases, databases with
......@@ -195,32 +197,8 @@ error_def(ERR_TEXT);
*/
/* #GTM_THREAD_SAFE : The below macro (WAIT_FOR_REPL_INST_UNFREEZE) is thread-safe */
#define WAIT_FOR_REPL_INST_UNFREEZE(CSA) \
{ \
gd_region *reg; \
jnlpool_addrs_ptr_t local_jnlpool; /* needed by INSTANCE_FREEZE_HONORED */ \
char time_str[CTIME_BEFORE_NL + 2]; /* for GET_CUR_TIME macro */ \
DCL_THREADGBL_ACCESS; \
\
SETUP_THREADGBL_ACCESS; \
assert(NULL != CSA); \
if (INSTANCE_FREEZE_HONORED(CSA, local_jnlpool)) \
{ \
reg = ((sgmnt_addrs *)CSA)->region; \
if (!IS_GTM_IMAGE) \
{ \
GET_CUR_TIME(time_str); \
gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_MUINSTFROZEN, 5, CTIME_BEFORE_NL, &time_str[0], \
local_jnlpool->repl_inst_filehdr->inst_info.this_instname, DB_LEN_STR(reg)); \
} \
WAIT_FOR_REPL_INST_UNFREEZE_NOCSA_JPL(local_jnlpool); \
if (!IS_GTM_IMAGE) \
{ \
GET_CUR_TIME(time_str); \
gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_MUINSTUNFROZEN, 5, CTIME_BEFORE_NL, &time_str[0], \
local_jnlpool->repl_inst_filehdr->inst_info.this_instname, DB_LEN_STR(reg)); \
} \
} \
}
wait_for_repl_inst_unfreeze(CSA)
/* This is a safer version of the WAIT_FOR_REPL_INST_UNFREEZE macro, which waits for the instance freeze
* to be lifted off but is not sure if the process has access to the journal pool yet.
* If it does not, then it assumes the instance is not frozen.
......@@ -245,23 +223,8 @@ error_def(ERR_TEXT);
WAIT_FOR_REPL_INST_UNFREEZE_NOCSA_JPL(jnlpool); \
}
#define WAIT_FOR_REPL_INST_UNFREEZE_NOCSA_JPL(JPL) \
{ \
GBLREF int4 exit_state; \
GBLREF int4 exi_condition; \
\
assert((NULL != JPL) && (NULL != JPL->jnlpool_ctl)); \
/* If this region is not replicated, do not care for instance freezes */ \
while (JPL->jnlpool_ctl->freeze) \
{ \
if (exit_state != 0) \
{ \
forced_exit_err_display(); \
EXIT(-exi_condition); \
} \
SHORT_SLEEP(SLEEP_INSTFREEZEWAIT); \
DEBUG_ONLY(CLEAR_FAKE_ENOSPC_IF_MASTER_DEAD); \
} \
}
wait_for_repl_inst_unfreeze_nocsa_jpl(JPL)
#define WAIT_FOR_REPL_INST_UNFREEZE_NOCSA_SAFE \
{ \
GBLREF jnlpool_addrs_ptr_t jnlpool; \
......@@ -352,14 +315,21 @@ MBSTART { \
} \
} MBEND
void clear_fake_enospc_if_master_dead(void);
#define CLEAR_FAKE_ENOSPC_IF_MASTER_DEAD clear_fake_enospc_if_master_dead()
#else
#define FAKE_ENOSPC(CSA, FAKE_ENOSPC, LSEEKWRITE_TARGET, LCL_STATUS)
#endif
#ifdef DEBUG
#define DB_HANG_TRIGGER 75
#define DB_LSEEKWRITE_HANG(CSA) (WBTEST_ENABLED(WBTEST_DB_WRITE_HANG) \
&& (CSA) && ((struct sgmnt_addrs_struct *)(CSA))->nl \
&& (DB_HANG_TRIGGER \
== INTERLOCK_ADD(&(((struct sgmnt_addrs_struct *)(CSA)) \
->nl->db_writes), NULL, 1)))
#else
#define DB_LSEEKWRITE_HANG(CSA) FALSE
#endif
/* #GTM_THREAD_SAFE : The below macro (DB_LSEEKWRITE) is thread-safe */
#define DB_LSEEKWRITE(CSA, UDI, DB_FN, FD, OFFSET, BUFF, SIZE, STATUS) \
MBSTART { \
......@@ -369,7 +339,8 @@ MBSTART { \
assert(!CSA_LOCAL || !CSA_LOCAL->region || FILE_INFO(CSA_LOCAL->region)->grabbed_access_sem \
|| !(CSA_LOCAL)->nl || !FROZEN_CHILLED(CSA_LOCAL) || FREEZE_LATCH_HELD(CSA_LOCAL)); \
DBG_CHECK_DIO_ALIGNMENT(UDI, OFFSET, BUFF, SIZE); \
DO_LSEEKWRITE(CSA_LOCAL, DB_FN, FD, OFFSET, BUFF, SIZE, STATUS, fake_db_enospc, LSEEKWRITE_IS_TO_DB); \
DO_LSEEKWRITE(CSA_LOCAL, DB_FN, FD, OFFSET, BUFF, SIZE, STATUS, fake_db_enospc, DB_LSEEKWRITE_HANG(CSA), \
LSEEKWRITE_IS_TO_DB); \
} MBEND
/* This is similar to DB_LSEEKWRITE except that this is used by GTMSECSHR and since that is root-owned we do not want
......@@ -396,27 +367,58 @@ MBSTART { \
DO_LSEEKWRITEASYNC(CSA, DB_FN, FD, 0, BUFF, 0, CR, STATUS, fake_db_enospc, LSEEKWRITE_IS_TO_DB_ASYNC_RESTART); \
} MBEND
#ifdef DEBUG
#define JNL_HANG_TRIGGER 500
#define JNL_LSEEKWRITE_HANG(CSA) jnl_lseekwrite_hang(CSA)
static inline boolean_t jnl_lseekwrite_hang(struct sgmnt_addrs_struct *csa)
{
return (WBTEST_ENABLED(WBTEST_JNL_WRITE_HANG)
&& csa && csa->nl
&& (JNL_HANG_TRIGGER == INTERLOCK_ADD(&csa->nl->jnl_writes, NULL, 1)));
}
#define LSEEKWRITE_HANG_SLEEP() lseekwrite_hang_sleep()
static inline void lseekwrite_hang_sleep(void)
{
send_msg_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_TEXT, 2, LEN_AND_LIT("TEST-I-LSEEKWRITEHANGSTART")); \
SLEEP_USEC(180ULL * E_6, TRUE); /* Fixed 3 minutes, with restart. */
send_msg_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_TEXT, 2, LEN_AND_LIT("TEST-I-LSEEKWRITEHANGEND")); \
}
#else
#define JNL_LSEEKWRITE_HANG(CSA) FALSE
#define LSEEKWRITE_HANG_SLEEP() /**/
#endif
/* #GTM_THREAD_SAFE : The below macro (JNL_LSEEKWRITE) is thread-safe */
#define JNL_LSEEKWRITE(CSA, JNL_FN, FD, OFFSET, BUFF, SIZE, STATUS) \
DO_LSEEKWRITE(CSA, JNL_FN, FD, OFFSET, BUFF, SIZE, STATUS, fake_jnl_enospc, LSEEKWRITE_IS_TO_JNL)
DO_LSEEKWRITE(CSA, JNL_FN, FD, OFFSET, BUFF, SIZE, STATUS, fake_jnl_enospc, JNL_LSEEKWRITE_HANG(CSA), \
LSEEKWRITE_IS_TO_JNL)
/* #GTM_THREAD_SAFE : The below macro (DO_LSEEKWRITE) is thread-safe */
#define DO_LSEEKWRITE(CSA, FNPTR, FD, OFFSET, BUFF, SIZE, STATUS, FAKE_WHICH_ENOSPC, LSEEKWRITE_TARGET) \
#define DO_LSEEKWRITE(CSA, FNPTR, FD, OFFSET, BUFF, SIZE, STATUS, FAKE_WHICH_ENOSPC, HANG, LSEEKWRITE_TARGET) \
MBSTART { \
GBLREF uint4 process_id; \
int lcl_status; \
sgmnt_addrs *local_csa = CSA; \
intrpt_state_t prev_intrpt_state; \
\
if (NULL != local_csa) \
WAIT_FOR_REPL_INST_UNFREEZE_SAFE(local_csa); \
DEFER_INTERRUPTS(INTRPT_IN_DB_JNL_LSEEKWRITE, prev_intrpt_state); \
if (HANG) \
LSEEKWRITE_HANG_SLEEP(); \
LSEEKWRITE(FD, OFFSET, BUFF, SIZE, lcl_status); \
FAKE_ENOSPC(local_csa, FAKE_WHICH_ENOSPC, LSEEKWRITE_TARGET, lcl_status); \
if (ENOSPC == lcl_status) \
if ((ENOSPC == lcl_status) && (NULL != local_csa)) \
{ \
wait_for_disk_space(local_csa, (char *)FNPTR, FD, (off_t)OFFSET, (char *)BUFF, (size_t)SIZE, &lcl_status); \
assert((NULL == local_csa) || (NULL == local_csa->nl) || !local_csa->nl->FAKE_WHICH_ENOSPC \
|| (ENOSPC != lcl_status)); \
} \
STATUS = lcl_status; \
ENABLE_INTERRUPTS(INTRPT_IN_DB_JNL_LSEEKWRITE, prev_intrpt_state); \
} MBEND
/* #GTM_THREAD_SAFE : The below macro (DO_LSEEKWRITEASYNC) is thread-safe */
......@@ -447,4 +449,67 @@ MBSTART { \
#define REPL_INST_AVAILABLE(GD_PTR) (repl_inst_get_name((char *)replpool_id.instfilename, &full_len, \
SIZEOF(replpool_id.instfilename), return_on_error, GD_PTR))
/* Inline Functions */
static inline boolean_t instance_freeze_honored(sgmnt_addrs *csa, jnlpool_addrs_ptr_t *lcl_jnlpool_out)
{
jnlpool_addrs_ptr_t lcl_jnlpool;
GBLREF jnlpool_addrs_ptr_t jnlpool;
assert(NULL != csa);
*lcl_jnlpool_out = lcl_jnlpool = JNLPOOL_FROM(csa);
return ((NULL != lcl_jnlpool)
&& (NULL != lcl_jnlpool->jnlpool_ctl)
&& (REPL_ALLOWED(csa->hdr)
|| mupip_jnl_recover /* recover or rollback */
|| ((NULL != csa->nl) && (csa->nl->onln_rlbk_pid))));
}
static inline void wait_for_repl_inst_unfreeze_nocsa_jpl(jnlpool_addrs_ptr_t jpl)
{
GBLREF int4 exit_state;
GBLREF int4 exi_condition;
assert((NULL != jpl) && (NULL != jpl->jnlpool_ctl));
/* If this region is not replicated, do not care for instance freezes */
while (jpl->jnlpool_ctl->freeze)
{
if (exit_state != 0)
{
forced_exit_err_display();
EXIT(-exi_condition);
}
SHORT_SLEEP(SLEEP_INSTFREEZEWAIT);
DEBUG_ONLY(CLEAR_FAKE_ENOSPC_IF_MASTER_DEAD);
}
}
static inline void wait_for_repl_inst_unfreeze(sgmnt_addrs *csa)
{
gd_region *reg;
jnlpool_addrs_ptr_t local_jnlpool; /* needed by INSTANCE_FREEZE_HONORED */
char time_str[CTIME_BEFORE_NL + 2]; /* for GET_CUR_TIME macro */
DCL_THREADGBL_ACCESS;
SETUP_THREADGBL_ACCESS;
assert(NULL != csa);
if (INSTANCE_FREEZE_HONORED(csa, local_jnlpool))
{
reg = csa->region;
if (!IS_GTM_IMAGE)
{
GET_CUR_TIME(time_str);
gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_MUINSTFROZEN, 5, CTIME_BEFORE_NL, &time_str[0],
local_jnlpool->repl_inst_filehdr->inst_info.this_instname, DB_LEN_STR(reg));
}
WAIT_FOR_REPL_INST_UNFREEZE_NOCSA_JPL(local_jnlpool);
if (!IS_GTM_IMAGE)
{
GET_CUR_TIME(time_str);
gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_MUINSTUNFROZEN, 5, CTIME_BEFORE_NL, &time_str[0],
local_jnlpool->repl_inst_filehdr->inst_info.this_instname, DB_LEN_STR(reg));
}
}
}
#endif /* #ifndef ANTICIPATORY_FREEZE_H */