bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] full-read: Add extern "C" for C++.


From: Bruno Haible
Subject: Re: [PATCH] full-read: Add extern "C" for C++.
Date: Thu, 18 Apr 2024 00:36:04 +0200

Hi,

Miro Palmu wrote:
> * lib/full-read.h: Add extern "C" for C++.

Thanks for the report. In fact, many .h files in Gnulib still are not C++-safe.
Instead of fixing it one by one, let me do it for all (except the two
modules 'glibc-internal/scratch_buffer' and 'glibc-internal/dynarray', for
which the priority is to keep them in sync with glibc).


2024-04-17  Bruno Haible  <bruno@clisp.org>

        stdio, utime-h: Fix more linkage errors when using C++.
        * lib/stdio.in.h (rpl_fwrite, rpl_fwrite_unlocked): Use _GL_EXTERN_C
        instead of extern.
        * lib/utime.in.h (_gl_utimens_windows): Likewise.

2024-04-17  Bruno Haible  <bruno@clisp.org>

        Fix linkage errors when using C++.
        Reported by Miro Palmu <email@miropalmu.cc> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00274.html>.
        * lib/acl.h: Add 'extern "C" {' / '}' boilerplate.
        * lib/alignalloc.h: Likewise.
        * lib/aligned-malloc.h: Likewise.
        * lib/allocator.h: Likewise.
        * lib/arcfour.h: Likewise.
        * lib/arctwo.h: Likewise.
        * lib/areadlink.h: Likewise.
        * lib/argv-iter.h: Likewise.
        * lib/argz.in.h: Likewise.
        * lib/binary-io.h: Likewise.
        * lib/bitrotate.h: Likewise.
        * lib/bitset.h: Likewise.
        * lib/bitsetv.h: Likewise.
        * lib/c-strcaseeq.h: Likewise.
        * lib/canon-host.h: Likewise.
        * lib/careadlinkat.h: Likewise.
        * lib/chdir-long.h: Likewise.
        * lib/check-version.h: Likewise.
        * lib/classpath.h: Likewise.
        * lib/cloexec.h: Likewise.
        * lib/close-stream.h: Likewise.
        * lib/crc.h: Likewise.
        * lib/csharpcomp.h: Likewise.
        * lib/csharpexec.h: Likewise.
        * lib/cycle-check.h: Likewise.
        * lib/des.h: Likewise.
        * lib/dev-ino.h: Likewise.
        * lib/di-set.h: Likewise.
        * lib/eealloc.h: Likewise.
        * lib/exclude.h: Likewise.
        * lib/execinfo.in.h: Likewise.
        * lib/execute.h: Likewise.
        * lib/exitfail.h: Likewise.
        * lib/fcntl-safer.h: Likewise.
        * lib/file-set.h: Likewise.
        * lib/file-type.h: Likewise.
        * lib/filenamecat.h: Likewise.
        * lib/filevercmp.h: Likewise.
        * lib/fpending.h: Likewise.
        * lib/fprintftime.h: Likewise.
        * lib/fpucw.h: Likewise.
        * lib/fsusage.h: Likewise.
        * lib/ftoastr.h: Likewise.
        * lib/full-read.h: Likewise.
        * lib/gc.h: Likewise.
        * lib/getndelim2.h: Likewise.
        * lib/getnline.h: Likewise.
        * lib/getugroups.h: Likewise.
        * lib/glthread/tls.h: Likewise.
        * lib/hamt.h: Likewise.
        * lib/hard-locale.h: Likewise.
        * lib/hash-pjw-bare.h: Likewise.
        * lib/hash-pjw.h: Likewise.
        * lib/hash-triple.h: Likewise.
        * lib/hmac.h: Likewise.
        * lib/human.h: Likewise.
        * lib/i-ring.h: Likewise.
        * lib/idcache.h: Likewise.
        * lib/idx.h: Likewise.
        * lib/ino-map.h: Likewise.
        * lib/inttostr.h: Likewise.
        * lib/isapipe.h: Likewise.
        * lib/javacomp.h: Likewise.
        * lib/javaexec.h: Likewise.
        * lib/jit/cache.h: Likewise.
        * lib/linebuffer.h: Likewise.
        * lib/localeinfo.h: Likewise.
        * lib/long-options.h: Likewise.
        * lib/mbchar.h: Likewise.
        * lib/mbfile.h: Likewise.
        * lib/mbiter.h: Likewise.
        * lib/mbiterf.h: Likewise.
        * lib/mbuiter.h: Likewise.
        * lib/mbuiterf.h: Likewise.
        * lib/mcel.h: Likewise.
        * lib/memcasecmp.h: Likewise.
        * lib/memcoll.h: Likewise.
        * lib/memxor.h: Likewise.
        * lib/mgetgroups.h: Likewise.
        * lib/mkdir-p.h: Likewise.
        * lib/modechange.h: Likewise.
        * lib/mountlist.h: Likewise.
        * lib/mpsort.h: Likewise.
        * lib/msvc-nothrow.h: Likewise.
        * lib/nan.h: Likewise.
        * lib/openat-priv.h: Likewise.
        * lib/openat.h: Likewise.
        * lib/opendirat.h: Likewise.
        * lib/pagealign_alloc.h: Likewise.
        * lib/parse-datetime.h: Likewise.
        * lib/parse-duration.h: Likewise.
        * lib/physmem.h: Likewise.
        * lib/posixtm.h: Likewise.
        * lib/posixver.h: Likewise.
        * lib/printf-frexp.h: Likewise.
        * lib/printf-frexpl.h: Likewise.
        * lib/priv-set.h: Likewise.
        * lib/quote.h: Likewise.
        * lib/quotearg.h: Likewise.
        * lib/read-file.h: Likewise.
        * lib/readline.h: Likewise.
        * lib/readtokens.h: Likewise.
        * lib/readtokens0.h: Likewise.
        * lib/regex-quote.h: Likewise.
        * lib/renameatu.h: Likewise.
        * lib/rijndael-alg-fst.h: Likewise.
        * lib/rijndael-api-fst.h: Likewise.
        * lib/safe-alloc.h: Likewise.
        * lib/safe-write.h: Likewise.
        * lib/same-inode.h: Likewise.
        * lib/same.h: Likewise.
        * lib/save-cwd.h: Likewise.
        * lib/savedir.h: Likewise.
        * lib/savewd.h: Likewise.
        * lib/selinux-at.h: Likewise.
        * lib/signed-nan.h: Likewise.
        * lib/signed-snan.h: Likewise.
        * lib/snan.h: Likewise.
        * lib/sockets.h: Likewise.
        * lib/stdio-safer.h: Likewise.
        * lib/stdlib-safer.h: Likewise.
        * lib/streq.h: Likewise.
        * lib/strerror-override.h: Likewise.
        * lib/tmpdir.h: Likewise.
        * lib/trim.h: Likewise.
        * lib/u64.h: Likewise.
        * lib/unicase/casefold.h: Likewise.
        * lib/unicase/caseprop.h: Likewise.
        * lib/unicase/invariant.h: Likewise.
        * lib/unicase/special-casing.in.h: Likewise.
        * lib/unicase/unicasemap.h: Likewise.
        * lib/unicodeio.h: Likewise.
        * lib/unilbrk/lbrktables.h: Likewise.
        * lib/unilbrk/ulc-common.h: Likewise.
        * lib/uninorm/decompose-internal.h: Likewise.
        * lib/unistd-safer.h: Likewise.
        * lib/unitypes.in.h: Likewise.
        * lib/uniwbrk/wbrktable.h: Likewise.
        * lib/unlinkdir.h: Likewise.
        * lib/userspec.h: Likewise.
        * lib/utimecmp.h: Likewise.
        * lib/utimens.h: Likewise.
        * lib/windows-spawn.h: Likewise.
        * lib/write-any-file.h: Likewise.
        * lib/xbinary-io.h: Likewise.
        * lib/xgetcwd.h: Likewise.
        * lib/xgetdomainname.h: Likewise.
        * lib/xgethostname.h: Likewise.
        * lib/xmemcoll.h: Likewise.
        * lib/xprintf.h: Likewise.
        * lib/xreadlink.h: Likewise.
        * lib/xsize.h: Likewise.
        * lib/xstrndup.h: Likewise.
        * lib/xstrtod.h: Likewise.
        * lib/xstrtol.h: Likewise.
        * lib/yesno.h: Likewise.
        * lib/isnand-nolibm.h (isnand): Declare with C linkage.
        * lib/isnanf-nolibm.h (isnanf): Likewise.
        * lib/isnanl-nolibm.h (isnanl): Likewise.

Attachment: 0001-Fix-linkage-errors-when-using-C.patch
Description: Text Data

Attachment: 0002-stdio-utime-h-Fix-more-linkage-errors-when-using-C.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]