/usr/lib/x86_64-linux-gnu/fis-gtm/V6.3-000A_x86_64/gtm_string.h is in fis-gtm-6.3-000a 6.3-000A-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | /****************************************************************
* *
* Copyright (c) 2001-2016 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. *
* *
****************************************************************/
/* If this is not the vax, define string.h. This is because the Vax
has its own built-in instructions for string manipulation.
*/
#ifndef GTM_STRINGH
#define GTM_STRINGH
#include <string.h>
#define STRERROR strerror
#define STRCPY(DEST, SOURCE) strcpy((char *)(DEST), (char *)(SOURCE))
#define STRNCPY_LIT(DEST, LITERAL) strncpy((char *)(DEST), (char *)(LITERAL), SIZEOF(LITERAL) - 1) /* BYPASSOK */
#define STRNCPY_LIT_FULL(DEST, LITERAL) strncpy((char *)(DEST), (char *)(LITERAL), SIZEOF(LITERAL)) /* BYPASSOK */
#define STRNCPY_STR(DEST, STRING, LEN) strncpy((char *)(DEST), (char *)(STRING), LEN)
#define STRCMP(SOURCE, DEST) strcmp((char *)(SOURCE), (char *)(DEST))
#define STRNCMP_LIT(SOURCE, LITERAL) strncmp(SOURCE, LITERAL, SIZEOF(LITERAL) - 1) /* BYPASSOK */
/* Make sure that SIZEOF(SOURCE) > 0 or SOURCE != NULL before running. */
#define STRNCMP_LIT_FULL(SOURCE, LITERAL) strncmp(SOURCE, LITERAL, SIZEOF(LITERAL)) /* BYPASSOK */
#define STRNCMP_STR(SOURCE, STRING, LEN) strncmp(SOURCE, STRING, LEN)
/* Ensure that our uses of STRTOK and STRTOK_R are not called inside a timer handler */
#define STRTOK_R(STR, DELIM, SAVE) (DBG_ASSERT(FALSE == timer_in_handler) strtok_r(STR, DELIM, SAVE))
/* We need to catch any memcpy() that is used when the source and target strings overlap in any fashion so we can change
* them to a memmove. So in debug builds, assert fail if this is the case.
*/
#if defined(DEBUG) && !defined(BYPASS_MEMCPY_OVERRIDE)
# include "gtm_memcpy_validate_and_execute.h"
# ifdef memcpy
# undef memcpy /* Some platforms like AIX create memcpy as a #define which needs removing before re-define */
# endif
# define memcpy(TARGET, SRC, LEN) gtm_memcpy_validate_and_execute((void *)(TARGET), (const void *)(SRC), (LEN))
#endif
/* The strnlen() function is POSIX-2008 so not widely avaiable yet so use it or our own critter as appropriate */
#if (defined(__linux__) || defined(AIX))
# define STRNLEN(str, maxlen, rslt) rslt = strnlen(str, maxlen)
#else
# define STRNLEN(str, maxlen, rslt) \
{ \
unsigned char *c, *cend; \
\
for (c = (unsigned char *)str, cend = c + maxlen; c < cend; ++c) \
if ('\0' == *c) \
break; \
rslt = c - (unsigned char *)str; \
}
#endif
#define STRNDUP(STR, MAXLEN, DST) \
{ \
size_t local_len; \
\
STRNLEN(STR, MAXLEN, local_len); \
DST = (char *) malloc(local_len + 1); \
memcpy(DST, STR, local_len); \
DST[local_len] = '\0'; \
}
#endif
|