Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #109

Closed
wants to merge 7 commits into from
Closed

test #109

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: FreeBSD

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
FreeBSD-test:
runs-on: ubuntu-latest
name: Test xz on FreeBSD
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4
- name: Test in FreeBSD
id: test
uses: vmactions/FreeBSD-vm@f8be330398166d1eb0601f01353839d4052367b2 #v1.0.7
with:
usesh: true
prepare: |
pkg install -y autoconf automake gmake gettext-tools gtar libtool m4 po4a
run: |
export LC_ALL=C LANG=C
uname -a
./autogen.sh
./configure --enable-werror
make
make check VERBOSE=1
29 changes: 29 additions & 0 deletions .github/workflows/netbsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: NetBSD

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
NetBSD-test:
runs-on: ubuntu-latest
name: Test xz on NetBSD
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4
- name: Test in NetBSD
id: test
uses: vmactions/NetBSD-vm@da9ed4d7cd0fb64f330e2342ac5c77ba529b6a11 #v1.0.7
with:
usesh: true
prepare: |
/usr/sbin/pkg_add -v autoconf automake gmake gettext-tools gtar-base libtool-base m4
run: |
export LC_ALL=C LANG=C
uname -a
./autogen.sh
./configure --enable-werror
make
make check VERBOSE=1
31 changes: 31 additions & 0 deletions .github/workflows/openbsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: OpenBSD

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
OpenBSD-test:
runs-on: ubuntu-latest
name: Test xz on OpenBSD
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4
- name: Test in OpenBSD
id: test
uses: vmactions/OpenBSD-vm@eaa3d3f695a5a52971c23958f6dd4cd3397f959d #v1.0.8
with:
usesh: true
prepare: |
/usr/sbin/pkg_add -I -v autoconf-2.71 automake-1.16.5 gmake gettext-tools gtar libtool m4
run: |
export LC_ALL=C LANG=C
export AUTOCONF_VERSION=2.71
export AUTOMAKE_VERSION=1.16
uname -a
./autogen.sh
./configure --enable-werror
make
make check VERBOSE=1
29 changes: 29 additions & 0 deletions .github/workflows/solaris.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Solaris

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
solaris-test:
runs-on: ubuntu-latest
name: Test xz on Solaris
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4
- name: Test in Solaris
id: test
uses: vmactions/solaris-vm@548f790d1bc2b9342a76cbb47ddbb85875605559 #v1.0.2
with:
usesh: true
prepare: |
pkg install bash libtool automake gnu-m4 tree wget gcc autoconf
run: |
export LC_ALL=C LANG=C
uname -a
./autogen.sh
./configure --enable-werror
make
make check VERBOSE=1
39 changes: 31 additions & 8 deletions build-aux/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,37 @@
#############################################################################
#
# Author: Lasse Collin
# Kerin Millar
#
#############################################################################

sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/
s/LZMA_VERSION_STABILITY_BETA/beta/
s/LZMA_VERSION_STABILITY_STABLE//
s/^#define LZMA_VERSION_[MPS][AIT][AJNT][A-Z]* //p' \
src/liblzma/api/lzma/version.h \
| tr '\n' '|' \
| sed 's/|/./; s/|/./; s/|//g' \
| tr -d '\r\n'
# Solaris provides a legacy awk implementation as /usr/bin/awk. It also provides
# /usr/bin/nawk, which is more or less POSIX-compliant. Be sure to use it.
if grep Solaris /etc/release >/dev/null 2>&1; then
awk=nawk
else
awk=awk
fi

"$awk" -f - <<'EOF'

BEGIN {
ARGV[1] = "src/liblzma/api/lzma/version.h"
ARGC = 2
OFS = "."
ORS = ""
}

/^#define LZMA_VERSION_(MAJOR|MINOR|PATCH|STABILITY) / {
sub(/.*_/, "", $2)
sub(/.*_/, "", $3)
if ($2 != "STABILITY" || $3 != "STABLE") {
ver[$2] = tolower($3)
}
}

END {
print ver["MAJOR"], ver["MINOR"], ver["PATCH"] ver["STABILITY"]
}

EOF
3 changes: 3 additions & 0 deletions src/common/tuklib_integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@

#if defined(HAVE___BUILTIN_BSWAPXX)
// GCC >= 4.8 and Clang
# undef bswap16
# undef bswap32
# undef bswap64
# define bswap16(n) __builtin_bswap16(n)
# define bswap32(n) __builtin_bswap32(n)
# define bswap64(n) __builtin_bswap64(n)
Expand Down
7 changes: 7 additions & 0 deletions src/xz/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@ print_totals_basic(void)
totals.uncompressed_size),
checks);

#ifdef __sun
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
// Since we print totals only when there are at least two files,
// the English message will always use "%s files". But some other
// languages need different forms for different plurals so we
Expand All @@ -1189,6 +1193,9 @@ print_totals_basic(void)
totals.files <= ULONG_MAX ? totals.files
: (totals.files % 1000000) + 1000000),
uint64_to_str(totals.files, 0));
#ifdef __sun
# pragma GCC diagnostic pop
#endif

return;
}
Expand Down