From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH] pack-objects: move builtin-only code to its own header
Date: Thu, 27 May 2021 12:14:28 +0900 [thread overview]
Message-ID: <xmqqa6ogamwb.fsf@gitster.g> (raw)
In-Reply-To: <patch-1.1-d085d59a417-20210527T005213Z-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Thu, 27 May 2021 02:52:51 +0200")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Move the code that's only used in builtin/pack-objects.c to a new
> builtin/pack-objects.h header and out of pack-objects.h.
I've amended the early part of the proposed log message in
preparation for merging it to 'next' and then later down to
'master'.
Here is what the result looks like.
Thanks.
Author: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date: Thu May 27 02:52:51 2021 +0200
pack-objects: move static inline from a header to its sole consumer
Move the code that is only used in builtin/pack-objects.c out of
pack-objects.h.
This fixes an issue where Solaris's SunCC hasn't been able to compile
git since 483fa7f42d9 (t/helper/test-bitmap.c: initial commit,
2021-03-31).
The real origin of that issue is that in 898eba5e630 (pack-objects:
refer to delta objects by index instead of pointer, 2018-04-14)
utility functions only needed by builtin/pack-objects.c were added to
pack-objects.h. Since then the header has been used in a few other
places, but 483fa7f42d9 was the first time it was used by test helper.
Since Solaris is stricter about linking and the oe_get_size_slow()
function lives in builtin/pack-objects.c the build started failing
with:
Undefined first referenced
symbol in file
oe_get_size_slow t/helper/test-bitmap.o
ld: fatal: symbol referencing errors. No output written to t/helper/test-tool
On other platforms this is presumably OK because the compiler and/or
linker detects that the "static inline" functions that reference
oe_get_size_slow() aren't used.
Let's solve this by moving the relevant code from pack-objects.h to
builtin/pack-objects.c. This is almost entirely a code-only move, but
because of the early macro definitions in that file referencing some
of these inline functions we need to move the definition of "static
struct packing_data to_pack" earlier, and declare these inline
functions above the macros.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
next prev parent reply other threads:[~2021-05-27 3:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 1:32 [PATCH 0/3] pack-objects: introduce pack.preferBitmapTips Taylor Blau
2021-04-01 1:32 ` [PATCH 1/3] pack-bitmap: add 'test_bitmap_commits()' helper Taylor Blau
2021-04-01 1:32 ` [PATCH 2/3] t/helper/test-bitmap.c: initial commit Taylor Blau
2021-05-26 18:30 ` SunCC doesn't compile v2.32.0-rc* anymore (was "Re: [PATCH 2/3] t/helper/test-bitmap.c: initial commit") Ævar Arnfjörð Bjarmason
2021-05-26 18:44 ` Taylor Blau
2021-05-26 21:10 ` Ævar Arnfjörð Bjarmason
2021-05-27 0:52 ` [PATCH] pack-objects: move builtin-only code to its own header Ævar Arnfjörð Bjarmason
2021-05-27 1:30 ` Junio C Hamano
2021-05-27 2:40 ` Junio C Hamano
2021-05-27 3:14 ` Junio C Hamano [this message]
2021-05-27 12:51 ` Ævar Arnfjörð Bjarmason
2021-04-01 1:32 ` [PATCH 3/3] builtin/pack-objects.c: respect 'pack.preferBitmapTips' Taylor Blau
2021-04-01 13:05 ` Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa6ogamwb.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).