Skip to content

Commit

Permalink
Merge pull request zowe#268 from zowe/feature/jsonschema
Browse files Browse the repository at this point in the history
JSON Schema
  • Loading branch information
1000TurquoisePogs authored Mar 31, 2022
2 parents a662c1e + b1a4758 commit 08823e4
Show file tree
Hide file tree
Showing 75 changed files with 13,400 additions and 303 deletions.
18 changes: 18 additions & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

*
!.gitignore

# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.
17 changes: 17 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

tmp*

# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.
143 changes: 143 additions & 0 deletions build/build_cmgr_xlclang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
#!/bin/sh

# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

WORKING_DIR=$(dirname "$0")

# set -v

echo "********************************************************************************"
echo "Building configmgr..."

# These paths assume that the build is run from /zss/deps/zowe-common-c/builds



mkdir -p "${WORKING_DIR}/tmp-configmgr" && cd "$_"

COMMON="../.."
QUICKJS="../../../../../quickjs"
LIBYAML="../../../../../libyaml"

rm -f "${COMMON}/bin/configmgr"

MAJOR=0
MINOR=2
PATCH=5
VERSION="\"${MAJOR}.${MINOR}.${PATCH}\""

#if [ ! -d "${LIBYAML}" ]; then
# git clone git@github.com:yaml/libyaml.git
#fi

# export _C89_ACCEPTABLE_RC=4

xlclang \
-c \
-q64 \
-qascii \
"-Wc,float(ieee),longname,langlvl(extc99),gonum,goff,ASM,asmlib('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN')" \
-DYAML_VERSION_MAJOR=${MAJOR} \
-DYAML_VERSION_MINOR=${MINOR} \
-DYAML_VERSION_PATCH=${PATCH} \
-DYAML_VERSION_STRING="${VERSION}" \
-DYAML_DECLARE_STATIC=1 \
-D_OPEN_SYS_FILE_EXT=1 \
-D_XOPEN_SOURCE=600 \
-D_OPEN_THREADS=1 \
-DCONFIG_VERSION=\"2021-03-27\" \
-I "${LIBYAML}/include" \
-I "${QUICKJS}" \
${LIBYAML}/src/api.c \
${LIBYAML}/src/reader.c \
${LIBYAML}/src/scanner.c \
${LIBYAML}/src/parser.c \
${LIBYAML}/src/loader.c \
${LIBYAML}/src/writer.c \
${LIBYAML}/src/emitter.c \
${LIBYAML}/src/dumper.c \
${QUICKJS}/cutils.c \
${QUICKJS}/quickjs.c \
${QUICKJS}/quickjs-libc.c \
${QUICKJS}/libunicode.c \
${QUICKJS}/libregexp.c \
${QUICKJS}/porting/polyfill.c
#then
# echo "Done with qascii-compiled open-source parts"
#else
# echo "Build failed"
# exit 8
#fi

xlclang \
-q64 \
"-Wc,float(ieee),longname,langlvl(extc99),gonum,goff,ASM,asmlib('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN')" \
-D_OPEN_SYS_FILE_EXT=1 \
-D_XOPEN_SOURCE=600 \
-D_OPEN_THREADS=1 \
-DNOIBMHTTP=1 \
-I "${COMMON}/h" \
-I "${COMMON}/platform/posix" \
-I "${LIBYAML}/include" \
-I "${QUICKJS}" \
-o "${COMMON}/bin/configmgr" \
api.o \
reader.o \
scanner.o \
parser.o \
loader.o \
writer.o \
emitter.o \
dumper.o \
cutils.o \
quickjs.o \
quickjs-libc.o \
libunicode.o \
libregexp.o \
polyfill.o \
${COMMON}/c/alloc.c \
${COMMON}/c/bpxskt.c \
${COMMON}/c/charsets.c \
${COMMON}/c/collections.c \
${COMMON}/c/configmgr.c \
${COMMON}/c/embeddedjs.c \
${COMMON}/c/json.c \
${COMMON}/c/jsonschema.c \
${COMMON}/c/le.c \
${COMMON}/c/logging.c \
${COMMON}/c/microjq.c \
${COMMON}/c/parsetools.c \
${COMMON}/platform/posix/psxregex.c \
${COMMON}/c/recovery.c \
${COMMON}/c/scheduling.c \
${COMMON}/c/timeutls.c \
${COMMON}/c/utils.c \
${COMMON}/c/xlate.c \
${COMMON}/c/yaml2json.c \
${COMMON}/c/zos.c \
${COMMON}/c/zosfile.c
#then
# echo "Build successful"
# ls -l "${COMMON}/bin"
# exit 0
#else
# # remove configmgr in case the linker had RC=4 and produced the binary
# rm -f "${COMMON}/bin/configmgr"
# echo "Build failed"
# exit 8
#fi


# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.
112 changes: 112 additions & 0 deletions build/build_configmgr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/bin/sh

# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.

WORKING_DIR=$(dirname "$0")


echo "********************************************************************************"
echo "Building configmgr..."

rm -f "${COMMON}/bin/configmgr"

mkdir -p "${WORKING_DIR}/tmp-configmgr" && cd "$_"
COMMON="../.."

LIBYAML="libyaml"
MAJOR=0
MINOR=2
PATCH=5
VERSION="\"${MAJOR}.${MINOR}.${PATCH}\""

if [ ! -d "${LIBYAML}" ]; then
git clone git@github.com:yaml/libyaml.git
fi

export _C89_ACCEPTABLE_RC=0

if ! c89 \
-c \
-Wc,dll,expo,langlvl\(extc99\),gonum,goff,hgpr,roconst,ASM,asmlib\('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN'\) \
-Wc,agg,list\(\),so\(\),off,xref \
-Wc,ascii,noxplink \
-D_ENHANCED_ASCII_EXT=0xFFFFFFFF \
-DYAML_VERSION_MAJOR="${MAJOR}" \
-DYAML_VERSION_MINOR="${MINOR}" \
-DYAML_VERSION_PATCH="${PATCH}" \
-DYAML_VERSION_STRING="${VERSION}" \
-I "${LIBYAML}/include" \
${LIBYAML}/src/api.c \
${LIBYAML}/src/reader.c \
${LIBYAML}/src/scanner.c \
${LIBYAML}/src/parser.c \
${LIBYAML}/src/loader.c \
${LIBYAML}/src/writer.c \
${LIBYAML}/src/emitter.c \
${LIBYAML}/src/dumper.c
then
echo "Build failed"
exit 8
fi

if c89 \
-D_XOPEN_SOURCE=600 \
-DNOIBMHTTP=1 \
-D_OPEN_THREADS=1 \
-Wc,dll,expo,langlvl\(extc99\),gonum,goff,hgpr,roconst,ASM,asmlib\('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN'\) \
-Wc,agg,exp,list\(\),so\(\),off,xref \
-Wl,dll \
-I "${COMMON}/h" \
-I "${COMMON}/platform/posix" \
-I "${LIBYAML}/include" \
-o "${COMMON}/bin/configmgr" \
api.o \
reader.o \
scanner.o \
parser.o \
loader.o \
writer.o \
emitter.o \
dumper.o \
${COMMON}/c/alloc.c \
${COMMON}/c/bpxskt.c \
${COMMON}/c/charsets.c \
${COMMON}/c/collections.c \
${COMMON}/c/configmgr.c \
${COMMON}/c/json.c \
${COMMON}/c/jsonschema.c \
${COMMON}/c/le.c \
${COMMON}/c/logging.c \
${COMMON}/platform/posix/psxregex.c \
${COMMON}/c/recovery.c \
${COMMON}/c/scheduling.c \
${COMMON}/c/timeutls.c \
${COMMON}/c/utils.c \
${COMMON}/c/xlate.c \
${COMMON}/c/yaml2json.c \
${COMMON}/c/zos.c \
${COMMON}/c/zosfile.c
then
echo "Build successful"
exit 0
else
# remove configmgr in case the linker had RC=4 and produced the binary
rm -f "${COMMON}/bin/configmgr"
echo "Build failed"
exit 8
fi


# This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v2.0 which accompanies
# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
#
# Copyright Contributors to the Zowe Project.
4 changes: 3 additions & 1 deletion c/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,10 @@ static char *safeMalloc64Internal(int size, char *site, long long token){
}
#if defined(METTLE) && defined(_LP64)
res = getmain64((long long)sizeInMegabytes,NULL,NULL);
#elif defined(_LP64) /* LE case */
#elif defined(_LP64) /* LE case */
res = malloc(size); /* According to Redpaper http://www.redbooks.ibm.com/redpapers/pdfs/redp9110.pdf allocated above bar */
#elif defined(_MSC_VER) && defined(_M_X64) /* Windows 64 case */
res = malloc(size);
#else
res = NULL; /* Invalid if not compiled _LP64 */
#endif
Expand Down
4 changes: 2 additions & 2 deletions c/as.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ int addressSpaceCreateWithTerm(const ASParmString *startParmString,
void * __ptr32 termCallbackParm,
int *reasonCode) {

__packed union {
_Packed union {
ASUserToken tokenValue;
__packed struct {
_Packed struct {
ASCRETermCallback * __ptr32 termCallback;
void * __ptr32 termCallbackParm;
};
Expand Down
Loading

0 comments on commit 08823e4

Please sign in to comment.