# HG changeset patch # User Mike Becker # Date 1761774740 -3600 # Node ID 48ebc3dd34a5fd59f4376a66c651af68b99c1ca5 # Parent 661dd5f26bfd13aab91e9df1c07cbc10c6b01e0c update uwproj and UCX diff -r 661dd5f26bfd -r 48ebc3dd34a5 configure --- a/configure Thu May 08 18:22:11 2025 +0200 +++ b/configure Wed Oct 29 22:52:20 2025 +0100 @@ -58,6 +58,7 @@ # $PLATFORM is used for platform dependent dependency selection OS=`uname -s` OS_VERSION=`uname -r` +ARCH=`uname -m` printf "detect platform... " if [ "$OS" = "SunOS" ]; then PLATFORM="solaris sunos unix svr4" @@ -229,6 +230,28 @@ printf "loading site defaults... " . "$prefix/etc/config.site" echo ok +else + # try to detect the correct libdir on our own, except it was changed by the user + if test "$libdir" = '${exec_prefix}/lib'; then + if [ "$OS" = "SunOS" ]; then + test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64' + else + # check if the standard libdir even exists + if test -d "${exec_prefix}/lib" ; then + : + else + # if it does not, maybe a lib32 exists + test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' + fi + # now check if there is a special 64bit libdir that we should use + for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do + if [ $ARCH = $i ]; then + test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' + break + fi + done + fi + fi fi @@ -296,12 +319,15 @@ # dependency ucx while true do - if check_lib ucx cx/list.h > /dev/null ; then - : + if [ -z "$PKG_CONFIG" ]; then + break + fi + if test_pkg_config "ucx" "3.2" "" "" ; then + TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags ucx`" + TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs ucx`" else break fi - TEMP_LDFLAGS="$TEMP_LDFLAGS -lucx" print_check_msg "$dep_checked_ucx" "yes\n" dep_checked_ucx=1 return 1 @@ -362,12 +388,12 @@ # build type if [ "$BUILD_TYPE" = "debug" ]; then - TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" - TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" + TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS" + TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS" fi if [ "$BUILD_TYPE" = "release" ]; then - TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" - TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" + TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS" + TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS" fi # add general dependency flags to flags.mk diff -r 661dd5f26bfd -r 48ebc3dd34a5 make/configure.vm --- a/make/configure.vm Thu May 08 18:22:11 2025 +0200 +++ b/make/configure.vm Wed Oct 29 22:52:20 2025 +0100 @@ -59,6 +59,7 @@ # $PLATFORM is used for platform dependent dependency selection OS=`uname -s` OS_VERSION=`uname -r` +ARCH=`uname -m` printf "detect platform... " if [ "$OS" = "SunOS" ]; then PLATFORM="solaris sunos unix svr4" @@ -276,6 +277,28 @@ printf "loading site defaults... " . "$prefix/etc/config.site" echo ok +else + # try to detect the correct libdir on our own, except it was changed by the user + if test "$libdir" = '${exec_prefix}/lib'; then + if [ "$OS" = "SunOS" ]; then + test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64' + else + # check if the standard libdir even exists + if test -d "${exec_prefix}/lib" ; then + : + else + # if it does not, maybe a lib32 exists + test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' + fi + # now check if there is a special 64bit libdir that we should use + for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do + if [ $ARCH = $i ]; then + test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' + break + fi + done + fi + fi fi ]]# ## End of unparsed content ** @@ -377,7 +400,7 @@ fi #end #foreach( $test in $sub.tests ) - if $test > /dev/null ; then + if $test > /dev/null 2>&1 ; then : else break @@ -479,7 +502,6 @@ #foreach( $flags in $dependency.flags ) #if( $flags.exec ) - $flags.value > /dev/null if tmp_flags=`$flags.value` ; then TEMP_$flags.varName="$TEMP_$flags.varName $tmp_flags" else @@ -503,12 +525,12 @@ # build type if [ "$BUILD_TYPE" = "debug" ]; then - TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" - TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" + TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS" + TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS" fi if [ "$BUILD_TYPE" = "release" ]; then - TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" - TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" + TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS" + TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS" fi # add general dependency flags to flags.mk diff -r 661dd5f26bfd -r 48ebc3dd34a5 make/project.xml --- a/make/project.xml Thu May 08 18:22:11 2025 +0200 +++ b/make/project.xml Wed Oct 29 22:52:20 2025 +0100 @@ -12,8 +12,7 @@ - check_lib ucx cx/list.h - -lucx + ucx diff -r 661dd5f26bfd -r 48ebc3dd34a5 make/toolchain.sh --- a/make/toolchain.sh Thu May 08 18:22:11 2025 +0200 +++ b/make/toolchain.sh Wed Oct 29 22:52:20 2025 +0100 @@ -68,7 +68,7 @@ #else std::cout << "toolchain:unknown" << std::endl; #endif - std:cout << "wsize:" << sizeof(void*)*8 << std::endl; + std::cout << "wsize:" << sizeof(void*)*8 << std::endl; return 0; } __EOF__ @@ -126,6 +126,14 @@ fi } +parse_toolchain_properties() +{ + info_file="$1" + TOOLCHAIN=`grep '^toolchain:' "$info_file" | tail -c +11` + TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -` + TOOLCHAIN_WSIZE=`grep '^wsize:' "$info_file" | tail -c +7` +} + detect_c_compiler() { if [ -n "$TOOLCHAIN_CC" ]; then @@ -136,9 +144,7 @@ if check_c_compiler "$CC"; then TOOLCHAIN_CC=$CC "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out" - TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11` - TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -` - TOOLCHAIN_WSIZE=`grep '^wsize:' "$TEMP_DIR/checkcc_out" | tail -c +7` + parse_toolchain_properties "$TEMP_DIR/checkcc_out" TOOLCHAIN_CSTD=`grep '^stdcversion:' "$TEMP_DIR/checkcc_out" | tail -c +13` echo "$CC" return 0 @@ -152,9 +158,7 @@ if check_c_compiler "$COMP"; then TOOLCHAIN_CC=$COMP "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out" - TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11` - TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -` - TOOLCHAIN_WSIZE=`grep '^wsize:' "$TEMP_DIR/checkcc_out" | tail -c +7` + parse_toolchain_properties "$TEMP_DIR/checkcc_out" TOOLCHAIN_CSTD=`grep '^stdcversion:' "$TEMP_DIR/checkcc_out" | tail -c +13` echo "$COMP" return 0 @@ -176,8 +180,7 @@ if check_cpp_compiler "$CXX"; then TOOLCHAIN_CXX=$CXX "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out" - TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11` - TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -` + parse_toolchain_properties "$TEMP_DIR/checkcc_out" echo "$CXX" return 0 else @@ -190,8 +193,7 @@ if check_cpp_compiler "$COMP"; then TOOLCHAIN_CXX=$COMP "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out" - TOOLCHAIN=`grep '^toolchain:' "$TEMP_DIR/checkcc_out" | tail -c +11` - TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -` + parse_toolchain_properties "$TEMP_DIR/checkcc_out" echo "$COMP" return 0 fi diff -r 661dd5f26bfd -r 48ebc3dd34a5 src/highlighter.c --- a/src/highlighter.c Thu May 08 18:22:11 2025 +0200 +++ b/src/highlighter.c Wed Oct 29 22:52:20 2025 +0100 @@ -55,7 +55,7 @@ static int check_keyword(cxstring word, const char** keywords) { for (int i = 0 ; keywords[i] ; i++) { - if (cx_strcmp(word, cx_str(keywords[i])) == 0) { + if (cx_strcmp(word, keywords[i]) == 0) { return 1; } } @@ -371,13 +371,12 @@ if (wbuf->size > 0) { cxstring word = cx_strn(wbuf->space, wbuf->size); int closespan = 1; - cxstring typesuffix = CX_STR("_t"); if (check_keyword(word, ckeywords)) { start_span("keyword"); - } else if (cx_strsuffix(word, typesuffix)) { + } else if (cx_strsuffix(word, "_t")) { start_span("type"); } else if (word.ptr[0] == '#') { - isinclude = !cx_strcmp(word, CX_STR("#include")); + isinclude = !cx_strcmp(word, "#include"); start_span("directive"); } else if (check_capsonly(word)) { start_span("macroconst");