Re: [PATCH v3] cache.h: auto-detect if zlib has uncompress2()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.01.22 00:23, Junio C Hamano wrote:
Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

As noted in the updated commit message this approach of having an
object just for this fallback function comes at the cost of some
complexity, but now the compat object lives neatly in its own object.

I do not see any change in this patch adding costly complexity, but
I notice lack of one possible trick that might become problem with
some compilers and linkers when their zlib has uncompress2()
function.  Let's have this graduate very early in the next cycle, to
see if anybody on a rarer system sees a complaint due to having to
deal with a totally empty object file.

OpenSSL has a macro in include/openssl/macros.h to counteract exactly this:

    /*
* Sometimes OPENSSL_NO_xxx ends up with an empty file and some compilers
     * don't like that.  This will hopefully silence them.
     */
    #define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy;

They insert it in the otherwise empty "#else" branch of conditionally complied code.


Cheers, Beat



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux