diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77f9a9d..7a66099 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,19 +108,34 @@ jobs: MDBPATH: test/data windows: runs-on: windows-latest - env: - MSYSTEM: MINGW64 + strategy: + fail-fast: false + matrix: + iconv: [ enable-iconv, disable-iconv] + glib: [ enable-glib, disable-glib ] + defaults: + run: + shell: msys2 {0} steps: + - uses: msys2/setup-msys2@v2 + with: + update: true + install: >- + autotools + base-devel + gcc + git + glib2 - uses: actions/checkout@v2 - name: Check out test data run: git clone https://github.com/mdbtools/mdbtestdata.git test - name: Autoconf - run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && autoreconf -i -f' + run: autoreconf -i -f - name: Configure - run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && ./configure' + run: ./configure --${{ matrix.glib }} --${{ matrix.iconv }} - name: Make - run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && make' + run: make - name: Test - run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && bash -e -x ./test_script.sh' + run: bash -e -x ./test_script.sh - name: SQL Test - run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && bash -e -x ./test_sql.sh' + run: bash -e -x ./test_sql.sh diff --git a/configure.ac b/configure.ac index 921121d..84b5ec2 100644 --- a/configure.ac +++ b/configure.ac @@ -86,7 +86,7 @@ AC_SUBST(LFLAGS) CFLAGS="$CFLAGS -Wall -Werror" LOCALE_T=locale_t AS_CASE([$host], - [*mingw*], [LDFLAGS="$LDFLAGS -no-undefined" LOCALE_T=_locale_t], []) + [*mingw*], [LDFLAGS="$LDFLAGS -no-undefined" CFLAGS="$CFLAGS -D_spawnv=spawnv"], []) AC_SUBST(LOCALE_T) dnl See if iconv is present and wanted diff --git a/src/util/mdb-sql.c b/src/util/mdb-sql.c index 4257f5d..fa087a6 100644 --- a/src/util/mdb-sql.c +++ b/src/util/mdb-sql.c @@ -304,7 +304,7 @@ find_sql_terminator(char *s) } sp = &s[len-1]; - while (sp > s && isspace(*sp)) { + while (sp > s && isspace((int)*sp)) { sp--; } @@ -464,7 +464,7 @@ main(int argc, char **argv) if (in) { fprintf(stderr, "Can not handle nested opens\n"); } else { - while (*fname && isspace(*fname)) + while (*fname && isspace((int)*fname)) fname++; if (!(in = fopen(fname, "r"))) { fprintf(stderr,"Unable to open file %s\n", fname);