Skip to content
Commits on Source (3)
......@@ -27,7 +27,7 @@ foreach(lang ${languages})
endforeach()
# Defaults
set(version V6.3-005)
set(version ${V6.3-007})
if("${version}" STREQUAL "")
set(version V9.9-0)
endif()
......@@ -47,13 +47,21 @@ if(GTM_ENABLE_DEBUG)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
endif()
if ( CMAKE_COMPILER_IS_GNUCC )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Waddress")
endif()
set(install_permissions_script
OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)
if(CMAKE_VERSION VERSION_LESS 3.0.0)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)
else()
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG>)
endif()
# Only IA64 and x86_64 architectures use this option
set(gen_xfer_desc 0)
......
All software in this package is part of FIS GT.M (http://fis-gtm.com) which is Copyright 2018 Fidelity Information
All software in this package is part of FIS GT.M (http://fis-gtm.com) which is Copyright 2019 Fidelity Information
Services, Inc., and provided to you under the terms of a license. If there is a COPYING file included in this package,
it contains the terms of the license under which the package is provided to you. If there is not a COPYING file in the
package, you must ensure that your use of FIS GT.M complies with the license under which it is provided. If you are
......
All software in this package is part of FIS GT.M (http://fis-gtm.com)
which is Copyright 2018 Fidelity Information Services, Inc., and
which is Copyright 2019 Fidelity Information Services, Inc., and
provided to you under the terms of a license. If there is a COPYING
file included in this package, it contains the terms of the license under
which the package is provided to you. If there is not a COPYING file in
......@@ -10,7 +10,7 @@ package.
GT.M relies on CMake to generate the Makefiles to build GT.M from source. The
prerequisites are CMake (at least 2.8.5), GNU make (at least 3.81), Linux
(either x86 or x86_64), libraries and development files for libz, Unicode,
(either x86 or x86_64), libraries and development files for libz, Unicode(R),
OpenSSL and GPG. Debian 7, Ubuntu 12.04/14.04 LTS and RHEL 6.0 were used to do
the test builds for this distribution. The default ICU and GPG packages were
taken from the distribution repositories.
......@@ -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-005
$ tar xfz fis-gtm-V6.3-005.tar.gz
$ cd fis-gtm-V6.3-005
the name, fis-gtm-V6.3-007
$ tar xfz fis-gtm-V6.3-007.tar.gz
$ cd fis-gtm-V6.3-007
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-005, or any other valid path.
fis-gtm-V6.3-007, 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-005
$ cmake -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package <path to>/fis-gtm-V6.3-007
$ make
$ make install
$ cd package/lib/fis-gtm/V6.3-005_x86_64
$ cd package/lib/fis-gtm/V6.3-007_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-005_x86_64
# The recommended installation path is /opt/fis-gtm/V6.3-007_x86_64
$ sudo ./configure
......
fis-gtm (6.3-005-2ubuntu1) UNRELEASED; urgency=medium
fis-gtm (6.3-007-1) UNRELEASED; urgency=low
* Update for GT.M V6.3-007
* Replace László Böszörményi's patch, thanks for stepping in!
* Address compiler warnings
-- Amul Shah <Amul.Shah@fisglobal.com> Mon, 11 Feb 2019 16:00:01 -0500
-- Amul Shah <Amul.Shah@fisglobal.com> Mon, 11 Feb 2019 17:15:50 -0500
fis-gtm (6.3-005-2) unstable; urgency=medium
......
......@@ -29,7 +29,7 @@ Homepage: http://sourceforge.net/projects/fis-gtm
Package: fis-gtm
Architecture: all
Depends: ${misc:Depends},
fis-gtm-6.3-005
fis-gtm-6.3-007
Provides: mumps
Description: metapackage for the latest version of FIS-GT.M database
GT.M is a database engine with scalability proven in large real-time
......@@ -60,7 +60,7 @@ Description: metapackage for the latest version of FIS-GT.M database
.
This metapackage always depends from the default fis-gtm version.
Package: fis-gtm-6.3-005
Package: fis-gtm-6.3-007
Architecture: amd64 i386
Multi-Arch: same
Depends: ${shlibs:Depends},
......
......@@ -11,7 +11,7 @@ Last-Update: 2015-01-11
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -523,7 +523,7 @@
@@ -531,7 +531,7 @@
)
target_link_libraries(libgtmcrypt_openssl_AES256CFB ${GPG_LIBRARIES} ${TLS_LIBRARIES})
add_dependencies(libgtmcrypt_openssl_AES256CFB gen_gtm_threadgbl_deftypes)
......@@ -20,7 +20,7 @@ Last-Update: 2015-01-11
add_library(libgtmtls MODULE ${libgtmtls_SOURCES})
set_target_properties(libgtmtls PROPERTIES
@@ -533,7 +533,7 @@
@@ -541,7 +541,7 @@
)
target_link_libraries(libgtmtls ${TLS_LIBRARIES})
add_dependencies(libgtmtls gen_gtm_threadgbl_deftypes)
......
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -753,7 +753,9 @@
@@ -761,7 +761,9 @@
message(FATAL_ERROR "Command\n ${ICUCONFIG} --version\nproduced unrecognized output:\n ${icu_version}")
endif()
else()
......
This diff is collapsed.
This diff is collapsed.
/****************************************************************
* *
* Copyright 2001, 2010 Fidelity Information Services, Inc *
* 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 *
......@@ -9,8 +10,8 @@
* *
****************************************************************/
#ifndef __AUTO_ZLINK_H__
#define __AUTO_ZLINK_H__
#ifndef AUTO_ZLINK_H_INCLUDED
#define AUTO_ZLINK_H_INCLUDED
rhdtyp *auto_zlink (unsigned char *pc, int4 **line);
......
/****************************************************************
* *
* 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));
}
/****************************************************************
* *
* Copyright (c) 2001-2018 Fidelity National Information *
* Copyright (c) 2001-2019 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......
/****************************************************************
* *
* Copyright (c) 2001-2018 Fidelity National Information *
* Copyright (c) 2001-2019 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......
#################################################################
# #
# Copyright 2001, 2012 Fidelity Information Services, Inc #
# 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 #
......@@ -36,6 +37,7 @@ SFT_REP_OP = 0x04
SFT_ZBRK_ACT = 0x08
SFT_DEV_ACT = 0x10
SFT_ZTRAP = 0x20
SFT_ZTIMEOUT = 0x40
SFT_ZSTEP_ACT = 0x80
SFT_ZINTR = 0x100
......
/****************************************************************
* *
* Copyright (c) 2001-2018 Fidelity National Information *
* Copyright (c) 2001-2019 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......
/****************************************************************
* *
* Copyright (c) 2001-2018 Fidelity National Information *
* Copyright (c) 2001-2019 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......@@ -1511,4 +1511,24 @@ const static readonly int error_ansi[] = {
0, /* LOADRECCNT */
0, /* COMMFILTERERR */
0, /* NOFILTERNEST */
0, /* MLKHASHTABERR */
0, /* LOCKCRITOWNER */
0, /* MLKHASHWRONG */
0, /* XCRETNULLREF */
0, /* EXTCALLBOUNDS */
0, /* EXCEEDSPREALLOC */
0, /* ZTIMEOUT */
0, /* ERRWZTIMEOUT */
0, /* MLKHASHRESIZE */
0, /* MLKHASHRESIZEFAIL */
0, /* MLKCLEANED */
0, /* NOTMNAME */
0, /* DEVNAMERESERVED */
0, /* ORLBKREL */
0, /* ORLBKRESTART */
0, /* UNIQNAME */
0, /* APDINITFAIL */
0, /* APDCONNFAIL */
0, /* APDLOGFAIL */
0, /* STATSDBMEMERR */
};
/****************************************************************
* *
* Copyright (c) 2001-2018 Fidelity National Information *
* Copyright (c) 2001-2019 Fidelity National Information *
* Services, Inc. and/or its subsidiaries. All rights reserved. *
* *
* This source code contains the intellectual property *
......@@ -78,7 +78,7 @@ LITDEF err_msg merrors[] = {
{ "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 },
{ "GBLOFLOW", "Database file !AD is full", 2 },
{ "CORRUPT", "Corrupt input in Blk # !UL, Key #!UL; resuming with next global block", 2 },
{ "GTMCHECK", "Internal GT.M error--Report to your GT.M Support Channel", 0 },
{ "GVDATAFAIL", "Global variable $DATA function failed. Failure code: !AD.", 2 },
......@@ -681,7 +681,7 @@ LITDEF err_msg merrors[] = {
{ "DISTPATHMAX", "$gtm_dist path is greater than maximum (!UL)", 1 },
{ "FILEOPENFAIL", "Failed to open file !AD", 2 },
{ "IMAGENAME", "The executing module name should be !AD instead of !AD", 4 },
{ "GTMSECSHRPERM", "The gtmsecshr module in $gtm_dist does not have the correct permission and uid", 0 },
{ "GTMSECSHRPERM", "The gtmsecshr module in $gtm_dist (!AD) does not have the correct permission: !AD, and UID: !UL", 5 },
{ "GTMDISTUNDEF", "Environment variable $gtm_dist is not defined", 0 },
{ "SYSCALL", "Error received from system call !AD -- called from module !AD at line !UL", 5 },
{ "MAXGTMPATH", "The executing module path is greater than the maximum !UL", 1 },
......@@ -1293,7 +1293,7 @@ LITDEF err_msg merrors[] = {
{ "STRMNUMMISMTCH1", "Stream !2UL exists on the receiver instance file but is unknown on the source instance", 1 },
{ "STRMNUMMISMTCH2", "Stream !2UL exists on the source instance file but is unknown on the receiver instance", 1 },
{ "STRMSEQMISMTCH", "Unable to play update on Stream !2UL with seqno [0x!16@XQ] as receiving instance has a different stream seqno [0x!16@XQ]", 3 },
{ "LOCKSPACEINFO", "Region: !AD: processes on queue: !UL/!UL; LOCK slots in use: !UL/!UL; name space!ADfull", 8 },
{ "LOCKSPACEINFO", "Region: !AD: processes on queue: !UL/!UL; LOCK slots in use: !UL/!UL; SUBSCRIPT slot bytes in use: !UL/!UL", 8 },
{ "JRTNULLFAIL", "Applying NULL journal record failed. Failure code: !AD.", 2 },
{ "LOCKSUB2LONG", "Following subscript is !UL bytes long which exceeds 255 byte limit.", 1 },
{ "RESRCWAIT", "Waiting briefly for the !AD semaphore for region !AD (!AD) was held by PID !UL (Sem. ID: !UL).", 8 },
......@@ -1508,11 +1508,31 @@ 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 },
{ "LOWSPC", "WARNING: Database !AD has !UL% or less 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 },
{ "MLKHASHTABERR", "A LOCK control structure is damaged and could not be corrected. Lock entry for !AD is invalid.", 2 },
{ "LOCKCRITOWNER", "LOCK crit is held by: !UL", 1 },
{ "MLKHASHWRONG", "A LOCK control structure has an invalid value; LOCK table failed integrity check. !AD", 2 },
{ "XCRETNULLREF", "Returned null reference from external call !AD", 2 },
{ "EXTCALLBOUNDS", "Wrote outside bounds of external call buffer. M label: !AZ", 1 },
{ "EXCEEDSPREALLOC", "Preallocated size !UL for M external call label !AZ exceeded by string of length !UL", 3 },
{ "ZTIMEOUT", "Time expired", 0 },
{ "ERRWZTIMEOUT", "Error while processing $ZTIMEOUT", 0 },
{ "MLKHASHRESIZE", "LOCK hash table increased in size from !UL to !UL and placed in shared memory (id = !UL)", 3 },
{ "MLKHASHRESIZEFAIL", "Failed to increase LOCK hash table size from !UL to !UL. Will retry with larger size.", 2 },
{ "MLKCLEANED", "LOCK garbage collection freed !UL lock slots for region !AD", 3 },
{ "NOTMNAME", "!AD is not a valid M name", 2 },
{ "DEVNAMERESERVED", "Cannot use !AD as device name. Reserved for GTM internal usage", 2 },
{ "ORLBKREL", "ONLINE ROLLBACK releasing all locking resources to allow a freeze OFF to proceed", 0 },
{ "ORLBKRESTART", "ONLINE ROLLBACK restarted on instance !AD corresponding to !AD", 4 },
{ "UNIQNAME", "Cannot provide same file name (!AD) for !AD and !AD", 6 },
{ "APDINITFAIL", "Audit Principal Device failed to initialize audit information", 0 },
{ "APDCONNFAIL", "Audit Principal Device failed to connect to audit logger", 0 },
{ "APDLOGFAIL", "Audit Principal Device failed to log activity", 0 },
{ "STATSDBMEMERR", "Process attempted to create stats block in statistics database !AD and received SIGBUS--invalid physical address. Check file system space.", 2 },
};
LITDEF int ERR_ACK = 150372361;
......@@ -3015,6 +3035,26 @@ LITDEF int ERR_FAILEDRECCOUNT = 150384330;
LITDEF int ERR_LOADRECCNT = 150384339;
LITDEF int ERR_COMMFILTERERR = 150384346;
LITDEF int ERR_NOFILTERNEST = 150384354;
LITDEF int ERR_MLKHASHTABERR = 150384362;
LITDEF int ERR_LOCKCRITOWNER = 150384371;
LITDEF int ERR_MLKHASHWRONG = 150384378;
LITDEF int ERR_XCRETNULLREF = 150384386;
LITDEF int ERR_EXTCALLBOUNDS = 150384396;
LITDEF int ERR_EXCEEDSPREALLOC = 150384402;
LITDEF int ERR_ZTIMEOUT = 150384408;
LITDEF int ERR_ERRWZTIMEOUT = 150384418;
LITDEF int ERR_MLKHASHRESIZE = 150384427;
LITDEF int ERR_MLKHASHRESIZEFAIL = 150384432;
LITDEF int ERR_MLKCLEANED = 150384443;
LITDEF int ERR_NOTMNAME = 150384450;
LITDEF int ERR_DEVNAMERESERVED = 150384458;
LITDEF int ERR_ORLBKREL = 150384467;
LITDEF int ERR_ORLBKRESTART = 150384475;
LITDEF int ERR_UNIQNAME = 150384482;
LITDEF int ERR_APDINITFAIL = 150384490;
LITDEF int ERR_APDCONNFAIL = 150384498;
LITDEF int ERR_APDLOGFAIL = 150384506;
LITDEF int ERR_STATSDBMEMERR = 150384514;
LITDEF int merrors_undocarr[] = {
......@@ -3051,7 +3091,7 @@ GBLDEF err_ctl merrors_ctl = {
246,
"GTM",
&merrors[0],
1500,
1520,
&merrors_undocarr[0],
26
};
......
This diff is collapsed.
#################################################################
# #
# Copyright (c) 2001-2017 Fidelity National Information #
# Copyright (c) 2001-2019 Fidelity National Information #
# Services, Inc. and/or its subsidiaries. All rights reserved. #
# #
# This source code contains the intellectual property #
......@@ -204,6 +204,10 @@ if ( $?gtm_version_change == "1" ) then
endif
endif
# TODO: integrate a build option to use these on demand
setenv gt_cc_option_DDEBUG_scan "-DBYPASS_MEMCPY_OVERRIDE -DSTATIC_ANALYSIS"
if ($?scan_image) setenv gt_cc_option_DDEBUG "$gt_cc_option_DDEBUG $gt_cc_option_DDEBUG_scan"
# -fno-defer-pop to prevent problems with assembly/generated code with optimization
# -fno-strict-aliasing since we don't comply with the rules
# -ffloat-store for consistent results avoiding rounding differences
......@@ -217,11 +221,20 @@ if ( $?gtm_version_change == "1" ) then
setenv gt_cc_option_optimize "$gt_cc_option_optimize -march=i586"
endif
endif
# -g generate debugging information for dbx (no longer overrides -O)
setenv gt_cc_option_debug "-g"
# Debugging options:
setenv gt_cc_option_debug "-g "
# Override the default debug settings for third party source code scans WARNING: these builds are HUGE
# -g3 generate debugging information including macros
# -O0 drop optimizations for alternate debuggers
# -fno-builtin avoid using compiler built-in functions for alternate debuggers
# -gdwarf-2 DWARF version 2 debugging (version 4, was release in 2010)
setenv gt_cc_option_debug_scan "-g3 -gdwarf-2 -O0 -fno-builtin "
if ( "cygwin" == $platform_only ) then
setenv gt_cc_option_debug "$gt_cc_option_debug -gdwarf-2 -fno-inline -fno-inline-functions"
setenv gt_cc_option_debug "$gt_cc_option_debug -gdwarf-2 -fno-inline -fno-inline-functions"
setenv gt_cc_option_debug_scan "$gt_cc_option_debug_scan -fno-inline -fno-inline-functions"
endif
if ($?scan_image) setenv gt_cc_option_debug "$gt_cc_option_debug_scan"
# Linker definitions:
setenv gt_ld_linker "$gt_cc_compiler" # redefine to use new C compiler definition
......