Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
60a910cd
Commit
60a910cd
authored
2 years ago
by
Duncan Bellamy
Browse files
Options
Downloads
Patches
Plain Diff
community/fmt: upgrade to 9.1.0
parent
7ac88440
No related branches found
No related tags found
2 merge requests
!39304
[3.16] main/expat: security upgrade to 2.4.9
,
!38322
community/fmt: upgrade to 9.1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
community/fmt/APKBUILD
+3
-6
3 additions, 6 deletions
community/fmt/APKBUILD
community/fmt/i386.patch
+0
-49
0 additions, 49 deletions
community/fmt/i386.patch
with
3 additions
and
55 deletions
community/fmt/APKBUILD
+
3
−
6
View file @
60a910cd
# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname
=
fmt
pkgname
=
fmt
pkgver
=
9.
0
.0
pkgver
=
9.
1
.0
pkgrel
=
0
pkgrel
=
0
pkgdesc
=
"Open-source formatting library for C++"
pkgdesc
=
"Open-source formatting library for C++"
url
=
"https://fmt.dev/latest/index.html"
url
=
"https://fmt.dev/latest/index.html"
...
@@ -9,9 +9,7 @@ arch="all"
...
@@ -9,9 +9,7 @@ arch="all"
license
=
"MIT"
license
=
"MIT"
makedepends
=
"cmake doxygen python3 samurai"
makedepends
=
"cmake doxygen python3 samurai"
subpackages
=
"
$pkgname
-dev
$pkgname
-doc"
subpackages
=
"
$pkgname
-dev
$pkgname
-doc"
source
=
"https://github.com/fmtlib/fmt/releases/download/
$pkgver
/fmt-
$pkgver
.zip
source
=
"https://github.com/fmtlib/fmt/releases/download/
$pkgver
/fmt-
$pkgver
.zip"
i386.patch
"
build
()
{
build
()
{
if
[
"
$CBUILD
"
!=
"
$CHOST
"
]
;
then
if
[
"
$CBUILD
"
!=
"
$CHOST
"
]
;
then
...
@@ -38,6 +36,5 @@ package() {
...
@@ -38,6 +36,5 @@ package() {
}
}
sha512sums
=
"
sha512sums
=
"
2074f44442b4d79207035411c2952598ffbae13fae86192427a32ae805d285268072ef2737928431b54406f82a3ad004e9b9a827125d29b795abd07e8d846177 fmt-9.0.0.zip
482d1ceaf042e97c66ff570babe9bd6f9cab7e4eec3dc56eb7d5e075b6b9b16f8eb333e96de9627fa33324d32b88d2aacebd0c34c3c706650eaa1729b0dd7fd6 fmt-9.1.0.zip
77de36c803d2fd6a3064f7ceac0879e6bb4f66a7612634d465f83cd0ea7e30c2e03fb9023b1a91edc58e2542bae03898cc70b0adaf48a8a79224539b0f9e84c5 i386.patch
"
"
This diff is collapsed.
Click to expand it.
community/fmt/i386.patch
deleted
100644 → 0
+
0
−
49
View file @
7ac88440
From 2a1b3ac629bfec51ce70d3c0ebaf28e706754e19 Mon Sep 17 00:00:00 2001
From: Victor Zverovich <viz@fb.com>
Date: Sun, 10 Jul 2022 08:14:18 -0700
Subject: [PATCH] Fix large shift in uint128_fallback
---
include/fmt/format.h | 2 ++
test/format-test.cc | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 0bd2fdb182..6516975e2f 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -366,10 +366,12 @@
class uint128_fallback {
}
FMT_CONSTEXPR auto operator>>(int shift) const -> uint128_fallback {
if (shift == 64) return {0, hi_};
+ if (shift > 64) return uint128_fallback(0, hi_) >> (shift - 64);
return {hi_ >> shift, (hi_ << (64 - shift)) | (lo_ >> shift)};
}
FMT_CONSTEXPR auto operator<<(int shift) const -> uint128_fallback {
if (shift == 64) return {lo_, 0};
+ if (shift > 64) return uint128_fallback(lo_, 0) << (shift - 64);
return {hi_ << shift | (lo_ >> (64 - shift)), (lo_ << shift)};
}
FMT_CONSTEXPR auto operator>>=(int shift) -> uint128_fallback& {
diff --git a/test/format-test.cc b/test/format-test.cc
index 45a92624fb..8c1c305f78 100644
--- a/test/format-test.cc
+++ b/test/format-test.cc
@@ -59,6 +59,8 @@
TEST(uint128_test, shift) {
EXPECT_EQ(static_cast<uint64_t>(n), 0x8000000000000000);
n = n >> 62;
EXPECT_EQ(static_cast<uint64_t>(n), 42);
+ EXPECT_EQ(uint128_fallback(1) << 112, uint128_fallback(0x1000000000000, 0));
+ EXPECT_EQ(uint128_fallback(0x1000000000000, 0) >> 112, uint128_fallback(1));
}
TEST(uint128_test, minus) {
@@ -234,7 +236,7 @@
TEST(util_test, format_system_error) {
throws_on_alloc = true;
}
if (!throws_on_alloc) {
- fmt::print("warning: std::allocator allocates {} chars", max_size);
+ fmt::print("warning: std::allocator allocates {} chars\n", max_size);
return;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment