diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /plugin/handler_socket/regtest/common/compat.sh | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugin/handler_socket/regtest/common/compat.sh')
-rw-r--r-- | plugin/handler_socket/regtest/common/compat.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/plugin/handler_socket/regtest/common/compat.sh b/plugin/handler_socket/regtest/common/compat.sh new file mode 100644 index 00000000..7804bdf1 --- /dev/null +++ b/plugin/handler_socket/regtest/common/compat.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +if [ "`uname -o`" = "Cygwin" ]; then + export DIFF='diff --ignore-space --strip-trailing-cr' +elif [ "`uname`" = "Darwin" ]; then + export DIFF='diff' +else + export DIFF='diff --ignore-space --strip-trailing-cr' +fi + +compile_c() { + if [ "`uname -o`" = "Cygwin" ]; then + cl /W3 /I../.. /EHsc /FD /MD "$1" /link /DLL "/OUT:$2.dll" \ + ../../libase.lib 2> cl.log + else + $CXX -I../.. -O3 -g -Wall -fPIC -shared "$1" -o "$2.so" + fi +} + +compile_j() { + if [ "`uname -o`" = "Cygwin" ]; then + jdk="`echo /cygdrive/c/Program\ Files/Java/jdk* | head -1`" + else + jdk="$SUNJDK" + fi + "$jdk/bin/javac" -g "$1"/*.java + "$jdk/bin/jar" -cf "$1.jar" "$1"/*.class +} + |