Skip to content

Fixes needed in Termux #7

Description

@Manamama

Quick FYI, that on Termux, Android this:

add_definitions(-D_GNU_SOURCE)
include(CheckIncludeFile)
check_include_file("limits.h" HAVE_LIMITS_H)
add_compile_definitions(-DSSIZE_MAX=9223372036854775807)

added to:

/data/data/com.termux/files/home/downloads/Levenshtein-0.24.0/src/Levenshtein

was needed to fix:

.0:23: error: 'SSIZE_MAX' was not declared in this scope; did you mean 'SIZE_MAX'?
 5750 |         if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
      |                       ^~~~~~~~~~~~~~
/data/data/com.termux/files/home/downloads/Levenshtein-0.24.0/src/Levenshtein/levenshtein_cpp.cxx:1456:43: note: in definition of macro 'unlikely'
 1456 |   #define unlikely(x) __builtin_expect(!!(x), 0)
      |                                           ^
/data/data/com.termux/files/home/downloads/Levenshtein-0.24.0/src/Levenshtein/levenshtein_cpp.cxx: In function 'Py_ssize_t __Pyx_ssize_strlen(const char*)':
/data/data/com.termux/files/home/downloads/Levenshtein-0.24.0/src/Levenshtein/levenshtein_cpp.cxx:9131:33: error: 'SSIZE_MAX' was not declared in this scope; did you mean 'SIZE_MAX'?
 9131 |     if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
      |                                 ^~~~~~~~~~~~~~
/data/data/com.termux/files/home/downloads/Levenshtein-0.24.0/src/Levenshtein/levenshtein_cpp.cxx:1456:43: note: in definition of macro 'unlikely'
 1456 |   #define unlikely(x) __builtin_expect(!!(x), 0)
      |                                           ^
make[2]: *** [src/Levenshtein/CMakeFiles/levenshtein_cpp.dir/build.make:76: src/Levenshtein/CMakeFiles/levenshtein_cpp.dir/levenshtein_cpp.cxx.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions